[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:42 PDT 2024


================
@@ -20,7 +20,7 @@ namespace clang::tidy::abseil {
 void DurationConversionCastCheck::registerMatchers(MatchFinder *Finder) {
   auto CallMatcher = ignoringImpCasts(callExpr(
       callee(functionDecl(DurationConversionFunction()).bind("func_decl")),
-      hasArgument(0, expr().bind("arg"))));
+      hasArgument(0, ignoringParenImpCasts(expr().bind("arg")))));
----------------
5chmidti wrote:

This change is not needed, the check does not care if implicit nodes are ignored or not, so we don't need to do the extra work. (This will leave in place the user's parentheses around the argument, if they wrote any)

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


More information about the llvm-commits mailing list