[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

Julian Schmidt via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 12:23:41 PDT 2024


================
@@ -62,9 +63,9 @@ void StringFindStartswithCheck::registerMatchers(MatchFinder *Finder) {
       callee(cxxMethodDecl(hasName("rfind")).bind("findfun")),
       on(hasType(StringType)),
       // ... with some search expression ...
-      hasArgument(0, expr().bind("needle")),
+      hasArgument(0, expr().ignoringParenImpCasts().bind("needle")),
----------------
5chmidti wrote:

Please remove the `ignoringParenImpCasts` from this `needle` as well.

https://github.com/llvm/llvm-project/pull/89553


More information about the llvm-commits mailing list