[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)
Nicolas van Kempen via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 15 13:08:45 PST 2024
================
@@ -171,10 +171,24 @@ void UseStartsEndsWithCheck::registerMatchers(MatchFinder *Finder) {
hasRHS(lengthExprForStringNode("needle")))))
.bind("expr"),
this);
+ Finder->addMatcher(
----------------
nicovank wrote:
This needs `clang-format`, not sure why the CI didn't catch it, maybe something to do with it only trying to format the diff and not the whole file.
```
clang-format -i clang-tools-extra/clang-tidy/modernize/UseStartsEndsWithCheck.cpp
```
https://github.com/llvm/llvm-project/pull/116033
More information about the cfe-commits
mailing list