[PATCH] D90984: Update matchers to be traverse-aware

2020-11-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4083 +return false; + return InnerMatcher.matches(*Arg->IgnoreParenImpCasts(), Finder, Builder); } aaron.ballman wrote: > This probably shouldn't compile given that th

[PATCH] D90982: Ignore implicit nodes in IgnoreUnlessSpelledInSource mode

2020-11-17 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG246b428fb3b5: [AST] Ignore implicit nodes in IgnoreUnlessSpelledInSource mode (authored by stephenkelly). Changed prior to commit: https://reviews

[PATCH] D90984: Update matchers to be traverse-aware

2020-11-17 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4cadb66b490e: [AST] Update matchers to be traverse-aware (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D90984?vs=3

[PATCH] D91639: Add documentation illustrating use of IgnoreUnlessSpelledInSource

2020-11-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. steveire requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D91639 Files: clang/docs/LibASTMatchersRef

[PATCH] D91639: Add documentation illustrating use of IgnoreUnlessSpelledInSource

2020-11-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 305863. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91639/new/ https://reviews.llvm.org/D91639 Files: clang/docs/LibASTMatchersReference.html Index: clang/docs/LibASTMatc

[PATCH] D90982: Ignore implicit nodes in IgnoreUnlessSpelledInSource mode

2020-11-18 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. I've removed the offending test (which in this case is the correct fix - it is not a temporary fix). @RKSimon Is there some way I can see what is causing the failures on the other platforms? Was it because of this test? How can I monitor this? I knew how to see it in

[PATCH] D91485: [clang-tidy] ElseAfterReturn check wont suggest fixes if preprocessor branches are involved

2020-11-18 Thread Stephen Kelly via Phabricator via cfe-commits
steveire requested changes to this revision. steveire added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp:34 + return; +auto &Collection = Collections[SM.getFileID(Loc)]; +

[PATCH] D91639: Add documentation illustrating use of IgnoreUnlessSpelledInSource

2020-11-19 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 306494. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91639/new/ https://reviews.llvm.org/D91639 Files: clang/docs/LibASTMatchersReference.html Index: clang/docs/LibASTMatc

[PATCH] D91639: Add documentation illustrating use of IgnoreUnlessSpelledInSource

2020-11-19 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/docs/LibASTMatchersReference.html:303 + + Replacement of `begin()` with `cbegin()`: + aaron.ballman wrote: > Backticks won't help here -- should probably use tags. `pre` is equivalent to three backticks. I added

[PATCH] D91639: Add documentation illustrating use of IgnoreUnlessSpelledInSource

2020-11-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/docs/LibASTMatchersReference.html:91-94 +This mode is hard to use correctly and +requires more development iteration because it means +that the user must write AST Matchers to explicitly traverse or ignore nodes +which are not vis

[PATCH] D91639: Add documentation illustrating use of IgnoreUnlessSpelledInSource

2020-11-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 306634. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91639/new/ https://reviews.llvm.org/D91639 Files: clang/docs/LibASTMatchersReference.html Index: clang/docs/LibASTMatc

[PATCH] D91639: Add documentation illustrating use of IgnoreUnlessSpelledInSource

2020-11-20 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2033fa29b09f: Add documentation illustrating use of IgnoreUnlessSpelledInSource (authored by stephenkelly). Repository: rG LLVM Github Monorepo C

[PATCH] D88275: [ASTMatchers] Add matcher `hasParentIgnoringImplicit`.

2020-10-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. I don't get email notifications when I'm pinged on Phab for some reason. I didn't know about this until the email from Aaron. // Fails EXPECT_TRUE( matches(Input, declRefExpr(traverse(TK_IgnoreImplicitCastsAndParentheses,

[PATCH] D88275: [ASTMatchers] Add matcher `hasParentIgnoringImplicit`.

2020-10-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D88275#2319290 , @ymandel wrote: > TL;DR Stephen's fix works; I'll drop this patch. > This is a longer discussion and not necessarily worth having on this review > thread. Are you attending the dev meeting today? If so, wan

[PATCH] D91916: Remove automatic traversal from forEach matcher

2020-11-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. steveire requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D91916 Files: clang/include/clang/ASTMatch

[PATCH] D91917: Update mode used in traverse() examples

2020-11-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. steveire requested review of this revision. traverse() predates the IgnoreUnlessSpelledInSource mode. Update example and test code to use the newer mode.

[PATCH] D91916: Remove automatic traversal from forEach matcher

2020-11-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 306858. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91916/new/ https://reviews.llvm.org/D91916 Files: clang/docs/ReleaseNotes.rst clang/include/clang/ASTMatchers/ASTMatc

[PATCH] D91918: Remove the IgnoreImplicitCastsAndParentheses traversal kind

2020-11-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. steveire requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D91918 Files: clang-tools-extra/clang-quer

[PATCH] D91916: Remove automatic traversal from forEach matcher

2020-11-23 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG72a9f365e993: Remove automatic traversal from forEach matcher (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D91917: Update mode used in traverse() examples

2020-11-23 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf052cf494f07: Update mode used in traverse() examples (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D91918: Remove the IgnoreImplicitCastsAndParentheses traversal kind

2020-11-23 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5e1801813d93: Remove the IgnoreImplicitCastsAndParentheses traversal kind (authored by stephenkelly). Changed prior to commit: https://reviews.llv

[PATCH] D80499: Remove obsolete ignore*() matcher uses

2020-10-25 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a subscriber: alexfh. steveire added a comment. @alexfh This change is based on the behavior of AST Matchers being changed to ignore invisible/implicit AST nodes by default. As the default was not changed in the end, this patch would need to be updated to add `traverse(TK_IgnoreU

[PATCH] D82278: Fix traversal over CXXConstructExpr in Syntactic mode

2020-10-25 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 300550. steveire added a comment. Rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82278/new/ https://reviews.llvm.org/D82278 Files: clang-tools-extra/clang-tidy/bugprone/ThrowKeywordMissingCheck.cpp

[PATCH] D82278: Fix traversal over CXXConstructExpr in Syntactic mode

2020-10-25 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 2 inline comments as done. steveire added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp:80 auto Matches = - match(expr(hasDescendant(typeLoc().bind("t"))), *E, *Result.Context); + match(traverse(TK_AsIs, expr(h

[PATCH] D80961: Ignore template instantiations if not in AsIs mode

2020-10-26 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 300629. steveire added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80961/new/ https://reviews.llvm.org/D80961 Files: clang/include/clang/AST/ASTNodeTraverser.h clang/include/clang/AST/

[PATCH] D80961: Ignore template instantiations if not in AsIs mode

2020-10-26 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 300630. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80961/new/ https://reviews.llvm.org/D80961 Files: clang/include/clang/AST/ASTNodeTraverser.h clang/include/clang/AST/

[PATCH] D80961: Ignore template instantiations if not in AsIs mode

2020-10-26 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Many of the changes which were part of a previous iteration of this change were related to the change of default behavior of matchers. As the default is no longer changed, those changes fell away. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D80499: Remove obsolete ignore*() matcher uses

2020-10-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. > ! In D80499#2353187 , @alexfh wrote: > You should be ready for back and forth with this change, if users hit > widespread issues not caught by tests. Maybe splitting it into separate > pieces and involving check authors where

[PATCH] D82278: Fix traversal over CXXConstructExpr in Syntactic mode

2020-10-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 301636. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82278/new/ https://reviews.llvm.org/D82278 Files: clang/lib/AST/Expr.cpp clang/lib/AST/ParentMapContext.cpp clang/u

[PATCH] D80623: WIP: Add an API to simplify setting TraversalKind in clang-tidy matchers

2020-10-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 301667. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80623/new/ https://reviews.llvm.org/D80623 Files: clang/include/clang/ASTMatchers/ASTMatchFinder.h clang/lib/ASTMatch

[PATCH] D80623: WIP: Add an API to simplify setting TraversalKind in clang-tidy matchers

2020-10-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added a comment. Reviving this so it can be used to port `clang-tidy` checks to `IgnoreUnlessSpelledInSource`. Comment at: clang/include/clang/ASTMatchers/ASTMatchFinder.h:118 +/// behavior of clang-tidy. +virtual llv

[PATCH] D82278: Fix traversal over CXXConstructExpr in Syntactic mode

2020-10-30 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG52ff86d25598: [AST] Fix traversal over CXXConstructExpr in Syntactic mode (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D90553: Rename CXXUnresolvedConstructExpr::arg_size for consistency

2020-11-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, ymandel. Herald added subscribers: cfe-commits, martong. Herald added a reviewer: shafik. Herald added a project: clang. steveire requested review of this revision. Make it possible to use argumentCountIs and hasArgument with

[PATCH] D80961: [clang][AST] Ignore template instantiations if not in AsIs mode

2020-11-02 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG53df3beb6249: Ignore template instantiations if not in AsIs mode (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D80

[PATCH] D90553: Rename CXXUnresolvedConstructExpr::arg_size for consistency

2020-11-02 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG537cc6dd2b36: Rename CXXUnresolvedConstructExpr::arg_size for consistency (authored by stephenkelly). Changed prior to commit: https://reviews.llv

[PATCH] D102185: Widen `name` stencil to support `TypeLoc` nodes.

2021-05-13 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbe5c7c5d8230: Widen `name` stencil to support `TypeLoc` nodes. (authored by SilensAngelusNex, committed by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D94865: [ASTMatchers] Add callOrConstruct matcher

2021-01-26 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2867 +extern const internal::MapAnyOfMatcher +callOrConstruct; + aaron.ballman wrote: > steveire wrote: > > aaron.ballman wrote: > > > steveire wrote: > > > > aaron.ball

[PATCH] D94880: Add clang-query support for mapAnyOf

2021-01-26 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 319431. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94880/new/ https://reviews.llvm.org/D94880 Files: clang/include/clang/ASTMatchers/Dynamic/Diagnostics.h clang/include

[PATCH] D94881: WIP: Add a way to define matcher builders in the dynamic registry

2021-01-26 Thread Stephen Kelly via Phabricator via cfe-commits
steveire abandoned this revision. steveire added a comment. The split here is artificial. This can't be tested without the changes adding mapAnyOf support. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94881/new/ https://reviews.llvm.org/D94881 _

[PATCH] D94865: [ASTMatchers] Add callOrConstruct matcher

2021-01-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 319660. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94865/new/ https://reviews.llvm.org/D94865 Files: clang/docs/LibASTMatchersReference.html clang/include/clang/ASTMatc

[PATCH] D94865: [ASTMatchers] Add callOrConstruct matcher

2021-01-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 319672. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94865/new/ https://reviews.llvm.org/D94865 Files: clang/docs/LibASTMatchersReference.html clang/include/clang/ASTMatc

[PATCH] D95562: [ASTMatchers] Fix traversal below range-for elements

2021-01-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D95562 Files: clang/lib/ASTMatchers/ASTMat

[PATCH] D95562: [ASTMatchers] Fix traversal below range-for elements

2021-01-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 319674. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95562/new/ https://reviews.llvm.org/D95562 Files: clang/lib/ASTMatchers/ASTMatchFinder.cpp clang/unittests/ASTMatcher

[PATCH] D95573: [ASTMatchers] Avoid pathological traversal over nested lambdas

2021-01-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D95573 Files: clang/include/clang/AST/Recu

[PATCH] D95562: [ASTMatchers] Fix traversal below range-for elements

2021-01-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 319705. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95562/new/ https://reviews.llvm.org/D95562 Files: clang/lib/ASTMatchers/ASTMatchFinder.cpp clang/unittests/ASTMatcher

[PATCH] D95562: [ASTMatchers] Fix traversal below range-for elements

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 319809. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95562/new/ https://reviews.llvm.org/D95562 Files: clang/lib/ASTMatchers/ASTMatchFinder.cpp clang/unittests/ASTMatcher

[PATCH] D95607: Fix traversal with hasDescendant into lambdas

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D95607 Files: clang/lib/ASTMatchers/ASTMat

[PATCH] D95573: [ASTMatchers] Avoid pathological traversal over nested lambdas

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6f0df3cddb3e: [ASTMatchers] Avoid pathological traversal over nested lambdas (authored by stephenkelly). Changed prior to commit: https://reviews.

[PATCH] D94865: [ASTMatchers] Add callOrConstruct matcher

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3c79734f2928: [ASTMatchers] Add invocation matcher (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D94865?vs=319672&id=319943#toc Repository: rG LLVM Github Monorepo CH

[PATCH] D94880: Add clang-query support for mapAnyOf

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. @aaron.ballman Please review this again as I've merged some more needed changes into it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94880/new/ https://reviews.llvm.org/D94880 __

[PATCH] D95644: Ensure that we traverse non-op() method bodys of lambdas

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: rsmith. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D95644 Files: clang/include/clang/AST/RecursiveAS

[PATCH] D95644: Ensure that we traverse non-op() method bodys of lambdas

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:485 + A a; + auto l = [a] { }; + auto lCopy = l; I don't know how to create a lambda with a default ctor body. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D95573: [ASTMatchers] Avoid pathological traversal over nested lambdas

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:2063-2065 + if (const auto *MD = dyn_cast(D)) { +if (const CXXRecordDecl *RD = MD->getParent()) { + if (RD->isLambda()) { rsmith wrote: > This is incorrectly skipp

[PATCH] D95644: Ensure that we traverse non-op() method bodys of lambdas

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 319987. steveire added a comment. Use helper method Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95644/new/ https://reviews.llvm.org/D95644 Files: clang/include/clang/AST/RecursiveASTVisitor.h clang/unit

[PATCH] D95644: Ensure that we traverse non-op() method bodys of lambdas

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:2065 if (const CXXRecordDecl *RD = MD->getParent()) { - if (RD->isLambda()) { + if (RD->isLambda() && RD->getLambdaCallOperator() == MD) { VisitBody = VisitBody && ge

[PATCH] D95644: Ensure that we traverse non-op() method bodys of lambdas

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 319992. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95644/new/ https://reviews.llvm.org/D95644 Files: clang/include/clang/AST/RecursiveASTVisitor.h clang/unittests/ASTMa

[PATCH] D95644: Ensure that we traverse non-op() method bodys of lambdas

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG43cc4f15008f: Ensure that we traverse non-op() method bodys of lambdas (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D95735: [ASTMatchers] Fix matching after generic top-level matcher

2021-01-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, alexfh. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. With a matcher like expr(anyOf(integerLiteral(equals(42)), unless(expr( and code such as st

[PATCH] D95562: [ASTMatchers] Fix traversal below range-for elements

2021-01-30 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG79125085f165: [ASTMatchers] Fix traversal below range-for elements (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D95607: Fix traversal with hasDescendant into lambdas

2021-01-30 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGbb57a3422a09: Fix traversal with hasDescendant into lambdas (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D95739: [ASTMatchers] Add matchers for decomposition decls

2021-01-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, alexfh. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D95739 Files: clang/include/clang/A

[PATCH] D95740: [ASTMatchers] Ignore parts of BindingDecls which are not spelled in source

2021-01-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, alexfh. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D95740 Files: clang/include/clang/A

[PATCH] D95726: clang-tidy: modernize-use-nullptr mistakenly fixes rewritten spaceship operator comparisons - hasGrandparent version

2021-01-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire requested changes to this revision. steveire added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3451 +internal::TypeList> +hasGrandparent; + I agree with @njames93 that we shouldn't introduce this matcher. Reposito

[PATCH] D95168: [clang-format] Add InsertBraces option

2021-01-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D95168#2532258 , @MyDeveloperDay wrote: > I wonder if we should consider suggesting a different type of tool for clang > > `clang-reformat` > > A place where changes such as this and east/west fixer could be actively > encour

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2021-01-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. The idea has been floated to create a new different tool for changes like this (see eg D95168 ). I don't think this should be done. These kinds of things should be in clang-format. One of the advantages of this and east/west const being

[PATCH] D95168: [clang-format] Add InsertBraces option

2021-01-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D95168#2532458 , @curdeius wrote: > In D95168#2532410 , @steveire wrote: > >> In D95168#2532258 , @MyDeveloperDay >> wrote: >> >>> I wonder if w

[PATCH] D95714: [clang-tidy] fix modernize-use-nullptr false positive with spaceship operator comparisons

2021-01-31 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D95714#2532957 , @poelmanc wrote: > Thoughts on which option seems like the best path forward? I think you should be able to correctly match everything. Try a matcher like (can probably be cleaned up a bit): auto isOrHasDe

[PATCH] D95735: [ASTMatchers] Fix matching after generic top-level matcher

2021-02-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D95735#2534400 , @aaron.ballman wrote: > I'm a bit confused -- I only get one match when I try out your example: > https://godbolt.org/z/xn9efY Are there other changes in-flight that > necessitate this, or is something else

[PATCH] D95740: [ASTMatchers] Ignore parts of BindingDecls which are not spelled in source

2021-02-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:2607 +EXPECT_TRUE(matches(Code, traverse(TK_AsIs, M))); +EXPECT_FALSE(matches(Code, traverse(TK_IgnoreUnlessSpelledInSource, M))); + } aaron.ballman wrot

[PATCH] D95740: [ASTMatchers] Ignore parts of BindingDecls which are not spelled in source

2021-02-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 320572. steveire added a comment. Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95740/new/ https://reviews.llvm.org/D95740 Files: clang/include/clang/AST/ASTNodeTraverser.h clang/lib/ASTMatchers/

[PATCH] D95739: [ASTMatchers] Add matchers for decomposition decls

2021-02-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 320578. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95739/new/ https://reviews.llvm.org/D95739 Files: clang/docs/LibASTMatchersReference.html clang/include/clang/ASTMatc

[PATCH] D94880: Add clang-query support for mapAnyOf

2021-02-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 320593. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94880/new/ https://reviews.llvm.org/D94880 Files: clang/include/clang/ASTMatchers/Dynamic/Diagnostics.h clang/include

[PATCH] D94880: Add clang-query support for mapAnyOf

2021-02-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/lib/ASTMatchers/Dynamic/Registry.cpp:697 - if (IsPolymorphic) { -OS << "Matcher " << Name << "(Matcher"; + std::string TypedText = std::string(Name); + aaron.ballman wrote: > Any reason this de

[PATCH] D95735: [ASTMatchers] Fix matching after generic top-level matcher

2021-02-02 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd6a06365cf12: [ASTMatchers] Fix matching after generic top-level matcher (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D95739: [ASTMatchers] Add matchers for decomposition decls

2021-02-02 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG467a04560143: [ASTMatchers] Add matchers for decomposition decls (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D95740: [ASTMatchers] Ignore parts of BindingDecls which are not spelled in source

2021-02-02 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9e5fc578f99a: [ASTMatchers] Ignore parts of BindingDecls which are not spelled in source (authored by stephenkelly). Repository: rG LLVM Github Mo

[PATCH] D94880: Add clang-query support for mapAnyOf

2021-02-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 320774. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94880/new/ https://reviews.llvm.org/D94880 Files: clang/include/clang/ASTMatchers/Dynamic/Diagnostics.h clang/include

[PATCH] D94880: Add clang-query support for mapAnyOf

2021-02-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D94880#2536399 , @aaron.ballman wrote: > I think there should be some documentation change for the new `with` > functionality. It's already documented in https://clang.llvm.org/docs/LibASTMatchersReference.html , just like

[PATCH] D95739: [ASTMatchers] Add matchers for decomposition decls

2021-02-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D95739#2536515 , @thakis wrote: > Looks like this doesn't link on windows: > http://45.33.8.238/win/32481/step_4.txt Thanks, should be fixed now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-02-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. I haven't read through all the comments, but the word 'easily' implies 'desirable'. This check seems to be for finding params which are undesirably swappable, right? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69560/new

[PATCH] D94131: [clang-tidy] Use new mapAnyOf matcher

2021-02-03 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 321233. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94131/new/ https://reviews.llvm.org/D94131 Files: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp clang-t

[PATCH] D94131: [clang-tidy] Use new mapping matchers

2021-02-03 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc0199b2a2170: [clang-tidy] Use new mapping matchers (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D94131?vs=321233

[PATCH] D96113: Add test coverage for hasParent() usage

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D96113 Files: clang/lib/AST/ParentMapConte

[PATCH] D96114: [ASTMatchers] Fix parent-child traversal between functions and parms

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added a subscriber: kristof.beyls. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Having to match on the typeLoc in AsIs mode is undesirable

[PATCH] D96082: [clang-tidy] Add 'readability-useless-return-value' check

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. @Eugene.Zelenko Why did you remove me from the reviewers list? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96082/new/ https://reviews.llvm.org/D96082 ___ cfe-commits mailing l

[PATCH] D94880: Add clang-query support for mapAnyOf

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. @aaron.ballman Any further comments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94880/new/ https://reviews.llvm.org/D94880 ___ cfe-commits mailing list cfe-commits@lists.llvm

[PATCH] D94880: Add clang-query support for mapAnyOf

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. That page collapses the documentation for each matcher, as you know. You need to expand the docs for `mapAnyOf`, as you know. You seem to know all this. What's the remaining issue? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D91303: [clang-tidy] readability-container-size-empty: simplify implementation

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2cba22c23a76: [clang-tidy] Simplify implementation of container-size-empty (authored by stephenkelly). Herald added a subscriber: nullptr.cpp. Chang

[PATCH] D80623: WIP: Add an API to simplify setting TraversalKind in clang-tidy matchers

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG538677abbde4: Add an API to simplify setting TraversalKind in clang-tidy matchers (authored by stephenkelly). Changed prior to commit: https://rev

[PATCH] D94880: Add clang-query support for mapAnyOf

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D94880#2544895 , @aaron.ballman wrote: > In D94880#2544873 , @steveire wrote: > >> That page collapses the documentation for each matcher, as you know. >> >> You need to expand the docs

[PATCH] D96131: [clang-tidy] Simplify function complexity check

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added subscribers: nullptr.cpp, lebedev.ri, xazax.hun. Herald added a reviewer: lebedev.ri. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. U

[PATCH] D96132: [clang-tidy] Simplify throw keyword missing check

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added subscribers: nullptr.cpp, xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://rev

[PATCH] D96135: [clang-tidy] Simplify braced init check

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added subscribers: nullptr.cpp, xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The normalization of matchers means that this now

[PATCH] D96138: [clang-tidy] Simplify delete null ptr check

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added subscribers: nullptr.cpp, xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Because it no longer relies on finding implicit ca

[PATCH] D96139: [clang-tidy] Simplify inaccurate erase check

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added subscribers: nullptr.cpp, xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The normalization of matchers means that this now

[PATCH] D96140: [clang-tidy] Simplify inefficient algorithm check

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added subscribers: nullptr.cpp, xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The normalization of matchers means that this now

[PATCH] D96141: [clang-tidy] Simplify const params check

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added subscribers: nullptr.cpp, xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://rev

[PATCH] D96142: [clang-tidy] Simplify too-small loop variable check

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added subscribers: nullptr.cpp, xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Don't issue a warning from within a template decla

[PATCH] D96082: [clang-tidy] Add 'readability-useless-return-value' check

2021-02-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D96082#2545106 , @Eugene.Zelenko wrote: > In D96082#2544778 , @steveire wrote: > >> @Eugene.Zelenko Why did you remove me from the reviewers list? > > Only project's maintainers should

[PATCH] D94880: Add clang-query support for mapAnyOf

2021-02-07 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG04b69d9a6013: Add clang-query support for mapAnyOf (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D94880?vs=320774&

<    2   3   4   5   6   7   8   9   10   11   >