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

2024-05-15 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Somehow I couldn't link that issue the normal way through the `Development` entry on the side, so I eddited in a `Fixed` message into the initial comment. https://github.com/llvm/llvm-project/pull/89553 ___ cfe-commits mailing list

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

2024-05-15 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited 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

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

2024-05-02 Thread via cfe-commits
komalverma04 wrote: > Thanks for looking into this. Because this is touching a lot of checks, there > was bound to be some conversation about which matchers need the > `ignoringParenImpCasts` and which don't. I think we should check that now > instead of later, so don't be alarmed about the

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

2024-05-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited 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

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -164,26 +164,32 @@ TEST_P(ASTMatchersTest, AllOf) { "void g(int x) { struct T t; f(x, , 3, 4); }"; EXPECT_TRUE(matches( Program, callExpr(allOf(callee(functionDecl(hasName("f"))), - hasArgument(0,

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -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")), +

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -97,11 +97,12 @@ AST_MATCHER_FUNCTION_P(StatementMatcher, isConstRefReturningMethodCall, hasCanonicalType(recordType(hasDeclaration(namedDecl( unless(matchers::matchesAnyListedName(ExcludedContainerTypes)); - return expr( -

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -46,20 +46,20 @@ void SlicingCheck::registerMatchers(MatchFinder *Finder) { isBaseInitializer(), withInitializer(equalsBoundNode("Call")); // Assignment slicing: "a = b;" and "a = std::move(b);" variants. - const auto SlicesObjectInAssignment = -

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -30,9 +30,9 @@ void UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher( cxxOperatorCallExpr( argumentCountIs(2), - hasArgument( - 0, expr(hasType(cxxRecordDecl(hasName("::absl::Duration"),

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -82,8 +82,8 @@ void StringConstructorCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher( cxxConstructExpr( hasDeclaration(cxxMethodDecl(hasName("basic_string"))), - hasArgument(0, hasType(qualType(isInteger(, -

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -102,8 +103,8 @@ void StringConstructorCheck::registerMatchers(MatchFinder *Finder) { cxxConstructExpr( hasDeclaration(cxxConstructorDecl(ofClass( cxxRecordDecl(hasAnyName(removeNamespaces(StringNames)), - hasArgument(0,

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -75,9 +76,10 @@ void UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) { hasParent(functionTemplateDecl()), unless(hasTemplateArgument(0, refersToType(builtinType(,

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

2024-05-01 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Please remove the formatting changes 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

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -62,9 +63,9 @@ void UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) { unless(hasTemplateArgument(0, refersToType(builtinType(, hasAnyName("::absl::operator*", "::absl::operator/"))),

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -22,9 +22,10 @@ void DurationDivisionCheck::registerMatchers(MatchFinder *Finder) { traverse(TK_AsIs, implicitCastExpr( hasSourceExpression(ignoringParenCasts( -

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -41,14 +41,17 @@ void StringLiteralWithEmbeddedNulCheck::registerMatchers(MatchFinder *Finder) { hasDeclaration(cxxMethodDecl(hasName("basic_string", // If present, the second argument is the alloc object which must not // be present

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -36,19 +36,21 @@ void DurationUnnecessaryConversionCheck::registerMatchers(MatchFinder *Finder) { // e.g. `absl::ToDoubleSeconds(dur)`. auto InverseFunctionMatcher = callExpr( callee(functionDecl(hasAnyName(FloatConversion, IntegerConversion))), -

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -98,16 +100,18 @@ void UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) { // `absl::Hours(x)` // where `x` is not of a built-in type. Finder->addMatcher( - traverse(TK_AsIs, implicitCastExpr( -

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -74,7 +74,7 @@ RewriteRuleWith StringviewNullptrCheckImpl() { auto BasicStringViewConstructingFromNullExpr = cxxConstructExpr( HasBasicStringViewType, argumentCountIs(1), - hasAnyArgument(/* `hasArgument` would skip over parens */ anyOf( +

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -54,9 +54,10 @@ makeRewriteRule(ArrayRef StringLikeClassNames, hasParameter( 0, parmVarDecl(anyOf(hasType(StringType), hasType(CharStarType), hasType(CharType)), - on(hasType(StringType)), hasArgument(0,

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -49,7 +49,8 @@ void UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) { hasParent(functionTemplateDecl()), unless(hasTemplateArgument(0, refersToType(builtinType(, hasAnyName("operator*=", "operator/="))),

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -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")), +

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -21,9 +21,10 @@ void DurationSubtractionCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher( binaryOperator( hasOperatorName("-"), - hasLHS(callExpr(callee(functionDecl(DurationConversionFunction()) -

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -75,10 +75,11 @@ rewriteInverseDurationCall(const MatchFinder::MatchResult , getDurationInverseForScale(Scale); if (const auto *MaybeCallArg = selectFirst( "e", - match(callExpr(callee(functionDecl(hasAnyName( -

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -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,

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

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -93,7 +94,8 @@ rewriteInverseTimeCall(const MatchFinder::MatchResult , llvm::StringRef InverseFunction = getTimeInverseForScale(Scale); if (const auto *MaybeCallArg = selectFirst( "e", match(callExpr(callee(functionDecl(hasName(InverseFunction))), -

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

2024-05-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited 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

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

2024-05-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti requested changes to this pull request. Thanks for looking into this. Because this is touching a lot of checks, there was bound to be some conversation about which matchers need the `ignoringParenImpCasts` and which don't. I think we should check that now instead

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

2024-04-30 Thread via cfe-commits
komalverma04 wrote: This file is deleted 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

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

2024-04-30 Thread via cfe-commits
komalverma04 wrote: Please ignore it, it is a format based change. https://github.com/llvm/llvm-project/pull/89553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-04-30 Thread via cfe-commits
@@ -0,0 +1,72 @@ +set(CMAKE_C_COMPILER "/usr/bin/cc") komalverma04 wrote: Yes, removing it. https://github.com/llvm/llvm-project/pull/89553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-04-30 Thread via cfe-commits
@@ -22,7 +22,7 @@ namespace clang::tidy::abseil { // - Make it work in macros if the outer and inner StrCats are both in the //argument. -void RedundantStrcatCallsCheck::registerMatchers(MatchFinder* Finder) { +void RedundantStrcatCallsCheck::registerMatchers(MatchFinder

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

2024-04-30 Thread via cfe-commits
@@ -0,0 +1,5 @@ +Script started on 2024-04-27 13:50:15+05:30 [TERM="xterm-256color" TTY="/dev/pts/0" COLUMNS="100" LINES="18"] komalverma04 wrote: Thank you for pointing out, i will do as you said. https://github.com/llvm/llvm-project/pull/89553

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

2024-04-29 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,72 @@ +set(CMAKE_C_COMPILER "/usr/bin/cc") PiotrZSL wrote: Looks like simple mistake, plee remove that build directory from a change. https://github.com/llvm/llvm-project/pull/89553 ___ cfe-commits mailing

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

2024-04-29 Thread via cfe-commits
@@ -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")), +

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

2024-04-29 Thread via cfe-commits
https://github.com/jkorous-apple requested changes to this pull request. Please start with removing all files that shouldn't be part of the PR. Then please remove changes that affect only format/whitespace. https://github.com/llvm/llvm-project/pull/89553

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

2024-04-29 Thread via cfe-commits
@@ -22,7 +22,7 @@ namespace clang::tidy::abseil { // - Make it work in macros if the outer and inner StrCats are both in the //argument. -void RedundantStrcatCallsCheck::registerMatchers(MatchFinder* Finder) { +void RedundantStrcatCallsCheck::registerMatchers(MatchFinder

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

2024-04-29 Thread via cfe-commits
@@ -0,0 +1,5 @@ +Script started on 2024-04-27 13:50:15+05:30 [TERM="xterm-256color" TTY="/dev/pts/0" COLUMNS="100" LINES="18"] jkorous-apple wrote: Please clean up the PR so it doesn't contain files that shouldn't be merged.

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

2024-04-29 Thread via cfe-commits
@@ -0,0 +1,72 @@ +set(CMAKE_C_COMPILER "/usr/bin/cc") jkorous-apple wrote: Also, why are we adding binaries? https://github.com/llvm/llvm-project/pull/89553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-04-29 Thread via cfe-commits
@@ -0,0 +1,72 @@ +set(CMAKE_C_COMPILER "/usr/bin/cc") jkorous-apple wrote: Why does this PR touch any CMake files? Is it necessary for the intended change of behavior of one or two AST matchers? https://github.com/llvm/llvm-project/pull/89553

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

2024-04-29 Thread via cfe-commits
https://github.com/jkorous-apple edited 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

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

2024-04-27 Thread via cfe-commits
komalverma04 wrote: @5chmidti Please take a look at it. Thank You 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