[PATCH] D19262: [clang-tidy] readability-container-size-empty fixes
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 19 06:30:44 PDT 2016
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
Thanks! LGTM with one nit.
================
Comment at: test/clang-tidy/readability-container-size-empty.cpp:44
@@ +43,3 @@
+ ;
+ // CHECK-MESSAGES: :[[@LINE-2]]:7: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty]
+ // CHECK-FIXES: {{^ }}if (str.empty()){{$}}
----------------
You don't need to check the whole message (we only check the whole message at first place), just keep `CHECK-MESSAGES: :[[@LINE-2]]:7: warning: the 'empty' method should be used`.
================
Comment at: test/clang-tidy/readability-container-size-empty.cpp:48
@@ +47,3 @@
+ ;
+ // CHECK-MESSAGES: :[[@LINE-2]]:7: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty]
+ // CHECK-FIXES: {{^ }}if (wstr.empty()){{$}}
----------------
The same.
http://reviews.llvm.org/D19262
More information about the cfe-commits
mailing list