New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugprone-standalone-empty
false positive when returning the result
#59517
Labels
Comments
EugeneZelenko
added
clang-tidy
false-positive
Warning fires when it should not
and removed
new issue
labels
Dec 14, 2022
@llvm/issue-subscribers-clang-tidy |
Proposed fix: https://reviews.llvm.org/D141107 |
cjdb
pushed a commit
that referenced
this issue
Jan 13, 2023
…lone-empty Relevant issue: #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
Fixed. Thanks @v1nh1shungry! |
CarlosAlbertoEnciso
pushed a commit
to SNSystems/llvm-debuginfo-analyzer
that referenced
this issue
Jan 13, 2023
…lone-empty Relevant issue: llvm/llvm-project#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
malavikasamak
pushed a commit
to apple/llvm-project
that referenced
this issue
Jan 24, 2023
…lone-empty Relevant issue: llvm#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 (cherry picked from commit 7910ee7)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://godbolt.org/z/v7rxqY1G7
The text was updated successfully, but these errors were encountered: