summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/readability-container-size-empty.cpp
diff options
context:
space:
mode:
authorGabor Horvath <xazax.hun@gmail.com>2015-12-21 09:43:52 +0000
committerGabor Horvath <xazax.hun@gmail.com>2015-12-21 09:43:52 +0000
commitc6ff9c349d8f2992ca27dfe82750ec251b44f52f (patch)
treed19976ba5fed46c6ed396ba49dcfa5e30738b992 /clang-tools-extra/test/clang-tidy/readability-container-size-empty.cpp
parente72bebaf2d285784068994a7f38e25ca0e1a8d27 (diff)
downloadbcm5719-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.cpp4
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
OpenPOWER on IntegriCloud