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
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
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
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
@@ -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,
@@ -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")),
+
@@ -97,11 +97,12 @@ AST_MATCHER_FUNCTION_P(StatementMatcher,
isConstRefReturningMethodCall,
hasCanonicalType(recordType(hasDeclaration(namedDecl(
unless(matchers::matchesAnyListedName(ExcludedContainerTypes));
- return expr(
-
@@ -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 =
-
@@ -30,9 +30,9 @@ void
UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
cxxOperatorCallExpr(
argumentCountIs(2),
- hasArgument(
- 0, expr(hasType(cxxRecordDecl(hasName("::absl::Duration"),
@@ -82,8 +82,8 @@ void StringConstructorCheck::registerMatchers(MatchFinder
*Finder) {
Finder->addMatcher(
cxxConstructExpr(
hasDeclaration(cxxMethodDecl(hasName("basic_string"))),
- hasArgument(0, hasType(qualType(isInteger(,
-
@@ -102,8 +103,8 @@ void StringConstructorCheck::registerMatchers(MatchFinder
*Finder) {
cxxConstructExpr(
hasDeclaration(cxxConstructorDecl(ofClass(
cxxRecordDecl(hasAnyName(removeNamespaces(StringNames)),
- hasArgument(0,
@@ -75,9 +76,10 @@ void
UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) {
hasParent(functionTemplateDecl()),
unless(hasTemplateArgument(0, refersToType(builtinType(,
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
@@ -62,9 +63,9 @@ void
UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) {
unless(hasTemplateArgument(0, refersToType(builtinType(,
hasAnyName("::absl::operator*", "::absl::operator/"))),
@@ -22,9 +22,10 @@ void DurationDivisionCheck::registerMatchers(MatchFinder
*Finder) {
traverse(TK_AsIs,
implicitCastExpr(
hasSourceExpression(ignoringParenCasts(
-
@@ -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
@@ -36,19 +36,21 @@ void
DurationUnnecessaryConversionCheck::registerMatchers(MatchFinder *Finder) {
// e.g. `absl::ToDoubleSeconds(dur)`.
auto InverseFunctionMatcher = callExpr(
callee(functionDecl(hasAnyName(FloatConversion, IntegerConversion))),
-
@@ -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(
-
@@ -74,7 +74,7 @@ RewriteRuleWith StringviewNullptrCheckImpl() {
auto BasicStringViewConstructingFromNullExpr =
cxxConstructExpr(
HasBasicStringViewType, argumentCountIs(1),
- hasAnyArgument(/* `hasArgument` would skip over parens */ anyOf(
+
@@ -54,9 +54,10 @@ makeRewriteRule(ArrayRef StringLikeClassNames,
hasParameter(
0, parmVarDecl(anyOf(hasType(StringType), hasType(CharStarType),
hasType(CharType)),
- on(hasType(StringType)), hasArgument(0,
@@ -49,7 +49,8 @@ void
UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) {
hasParent(functionTemplateDecl()),
unless(hasTemplateArgument(0, refersToType(builtinType(,
hasAnyName("operator*=", "operator/="))),
@@ -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")),
+
@@ -21,9 +21,10 @@ void DurationSubtractionCheck::registerMatchers(MatchFinder
*Finder) {
Finder->addMatcher(
binaryOperator(
hasOperatorName("-"),
- hasLHS(callExpr(callee(functionDecl(DurationConversionFunction())
-
@@ -75,10 +75,11 @@ rewriteInverseDurationCall(const MatchFinder::MatchResult
,
getDurationInverseForScale(Scale);
if (const auto *MaybeCallArg = selectFirst(
"e",
- match(callExpr(callee(functionDecl(hasAnyName(
-
@@ -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,
@@ -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))),
-
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
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
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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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")),
+
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
@@ -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
@@ -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.
@@ -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
@@ -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
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
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
42 matches
Mail list logo