diff options
author | Gabor Horvath <xazax.hun@gmail.com> | 2015-12-21 09:43:52 +0000 |
---|---|---|
committer | Gabor Horvath <xazax.hun@gmail.com> | 2015-12-21 09:43:52 +0000 |
commit | c6ff9c349d8f2992ca27dfe82750ec251b44f52f (patch) | |
tree | d19976ba5fed46c6ed396ba49dcfa5e30738b992 /clang-tools-extra/test/clang-tidy/readability-container-size-empty.cpp | |
parent | e72bebaf2d285784068994a7f38e25ca0e1a8d27 (diff) | |
download | bcm5719-llvm-c6ff9c349d8f2992ca27dfe82750ec251b44f52f.tar.gz bcm5719-llvm-c6ff9c349d8f2992ca27dfe82750ec251b44f52f.zip |
Fix a false positive case in ContainerSizeEmpty check (PR25893).
llvm-svn: 256142
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/readability-container-size-empty.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/readability-container-size-empty.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/readability-container-size-empty.cpp b/clang-tools-extra/test/clang-tidy/readability-container-size-empty.cpp index d7f2612b57d..e43feb92450 100644 --- a/clang-tools-extra/test/clang-tidy/readability-container-size-empty.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-container-size-empty.cpp @@ -50,6 +50,10 @@ int main() { ; // CHECK-MESSAGES: :[[@LINE-2]]:12: warning: the 'empty' method should be used // CHECK-FIXES: {{^ }}if (!vect.empty()){{$}} + if (vect.size() > 1) // no warning + ; + if (1 < vect.size()) // no warning + ; if (!vect.size()) ; // CHECK-MESSAGES: :[[@LINE-2]]:8: warning: the 'empty' method should be used |