llvm-project
ae282974 - [clang-tidy] Fix readability-else-after-return for [[likely]]/[[unlikely]] if (#184684)

Commit
1 day ago
[clang-tidy] Fix readability-else-after-return for [[likely]]/[[unlikely]] if (#184684) Following the PR #181878 I have noticed a false negative when if is attributed. Repro: ```cpp void f() { if (true) { return; } else { // Warns as expected } if (true) [[likely]] { return; } else { // False-negative } } ``` Godbolt: https://godbolt.org/z/cvGdovjhx
Author
Parents
Loading