[all-commits] [llvm/llvm-project] 7910ee: [clang-tidy] don't warn when returning the result ...
v1nh1shungry via All-commits
all-commits at lists.llvm.org
Thu Jan 12 17:15:42 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7910ee7d8c6dcb679200ba171fba5d8d5f237007
https://github.com/llvm/llvm-project/commit/7910ee7d8c6dcb679200ba171fba5d8d5f237007
Author: v1nh1shungry <v1nh1shungry at outlook.com>
Date: 2023-01-13 (Fri, 13 Jan 2023)
Changed paths:
M clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp
M clang-tools-extra/test/clang-tidy/checkers/bugprone/standalone-empty.cpp
Log Message:
-----------
[clang-tidy] don't warn when returning the result for bugprone-standalone-empty
Relevant issue: https://github.com/llvm/llvm-project/issues/59517
Currently this check will warn when the result is used in a `return`
statement, e.g.
```
bool foobar() {
std::vector<int> v;
return v.empty();
// will get a warning here, which makes no sense IMO
}
```
Reviewed By: cjdb, denik
Differential Revision: https://reviews.llvm.org/D141107
More information about the All-commits
mailing list