================ @@ -44,9 +44,10 @@ void StringFindStartswithCheck::registerMatchers(MatchFinder *Finder) { callee(cxxMethodDecl(hasName("find")).bind("findfun")), on(hasType(StringType)), // ... with some search expression ... - hasArgument(0, expr().bind("needle")), + hasArgument(0, expr().ignoringParenImpCasts().bind("needle")), ---------------- 5chmidti wrote:
There is also no need to add `ignoringParenImpCasts` to `needle`. All the needle node is used for is to get the source code, which does not care if we are at an implicit node or not (ln. 88, 103-104, 123). Leaving out the `ignoringParenImpCasts` will also keep a user's parentheses in-place, if they wrote them. https://github.com/llvm/llvm-project/pull/89553 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits