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

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 15:33:24 PDT 2024


================
@@ -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")),
----------------
jkorous-apple wrote:

What is the intent of using `ignoringParenImpCasts` here?

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


More information about the llvm-commits mailing list