[PATCH] D56644: [clang-tidy] readability-container-size-empty handle std::string length()
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 31 07:19:23 PST 2019
MyDeveloperDay added inline comments.
================
Comment at: test/clang-tidy/readability-container-size-empty.cpp:135
+ // CHECK-FIXES: {{^ }}if (str.empty()){{$}}
+ if (str.length() == 0)
+ ;
----------------
could you add a test that checks if StringRef.str().length() >0 becomes !StringRef.str.empty()
e.g.
```
LLVM::StringRef ArgRef;
....
return (ArgRef.str().length() > 0) ? ArgRef.str() + ")" : "()";
```
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56644/new/
https://reviews.llvm.org/D56644
More information about the cfe-commits
mailing list