[PATCH] D97784: [ASTMatchers] Always create a "binding" for the node being matched on.

2021-03-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Can you add some tests for this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97784/new/ https://reviews.llvm.org/D97784 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D97963: [ASTMatchers][Dynamic] Provide Fallback and suggestions for typos.

2021-03-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. I like the idea, but I think you're violating the Interface Segregation Principle by putting it in the `Registry::lookupMatcherCtor` implementation. The interface here is easy to use incorrectly. Consider adding a new method instead. That way, `lookupMatcherCtor` will

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 329509. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 329735. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 329737. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D97955: [clang-tidy] Refactor loop-convert to bring most of the checking into matchers

2021-03-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Good progress! This check also implements its own `StmtAncestorASTVisitor` which should probably be removed in favor of the `ParentMapContext` eventually (not in this patch). Comment at: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp:118

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 329759. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 9 inline comments as done. steveire added inline comments. Comment at: clang/lib/Tooling/CMakeLists.txt:99 + NodeIntrospection.cpp + NodeIntrospection.inc Tooling.cpp njames93 wrote: > This shouldn't appear in the source list. We need to tell

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-10 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 rGd627a27d264b: [AST] Add generator for source location introspection (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. @thakis Presumably you'll have to update the GN build now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 ___ cfe-commits mailing list

[PATCH] D97121: [clang-tidy] Add a Standalone diagnostics mode to clang-tidy

2021-03-14 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h:178 + void setSelfContainedDiags(bool Value = true) { SelfContainedDiags = Value; } +

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D93164#2624690 , @thakis wrote: > A few more high-level questions: > > - What's the point of the intermediary json file? Why not generate the final > c++ directly? (As far as I can tell, this wasn't discussed during the review

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D93164#2624760 , @dmgreen wrote: > Hello. Does this work when the default target triple isn't native? This seems > to be trying to compile clang sources with the just built clang - something > that I don't think is always pos

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D93164#2624798 , @nikic wrote: > Reverted in > https://github.com/llvm/llvm-project/commit/e0f70a8a979f5b843e90a0a20442ca79e2507208 > due to build failure. Was the problem there just the shebang line? Repository: rG LLVM

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D93164#2624798 , @nikic wrote: > Reverted in > https://github.com/llvm/llvm-project/commit/e0f70a8a979f5b843e90a0a20442ca79e2507208 > due to build failure. @nikic How do I run a test build on that machine? Or can you diagno

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG477e4b974653: [AST] Add generator for source location introspection (authored by stephenkelly). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://re

[PATCH] D61837: Make it possible control matcher traversal kind with ASTContext

2019-11-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 230678. steveire added a comment. Rebase and update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61837/new/ https://reviews.llvm.org/D61837 Files: clang/include/clang/AST/ASTContext.h clang/include/clang

[PATCH] D70613: Add method to ignore invisible AST nodes

2019-11-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D70613 Files: clang/include/clang/AST/ASTNodeTraverser.h clang/include/clang/

[PATCH] D61837: Make it possible control matcher traversal kind with ASTContext

2019-12-06 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0a717d5b5d31: Make it possible control matcher traversal kind with ASTContext (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D61837?vs=230678&id=232661#toc Repository:

[PATCH] D61837: Make it possible control matcher traversal kind with ASTContext

2019-12-06 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. I tried using DenseMap, but couldn't make it compile. I stuck with std::map for now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61837/new/ https://reviews.llvm.org/D61837

[PATCH] D62056: Use ASTDumper to dump the AST from clang-query

2019-12-06 Thread Stephen Kelly via Phabricator via cfe-commits
steveire closed this revision. steveire added a comment. Committed in b22d8ae7f436bfe63 . I don't know why this review didn't automatically update. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://rev

[PATCH] D54406: Add matchDynamic convenience functions

2019-12-06 Thread Stephen Kelly via Phabricator via cfe-commits
steveire closed this revision. steveire added a comment. Herald added a project: clang. Committed in 2e8dc8590d8b412 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54406/new/ https://reviews.ll

[PATCH] D71166: Deprecate the hasDefaultArgument matcher

2019-12-07 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. It doesn't provide a way to match on the contents of the default argumment. Rather than give it that capability, make it deprecated and recomment the us

[PATCH] D71166: Deprecate the hasDefaultArgument matcher

2019-12-10 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3e315ba2547c: Deprecate the hasDefaultArgument matcher (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D71166?vs=232711&id=233177#toc Repository: rG LLVM Github Monorepo

[PATCH] D70613: Add method to ignore invisible AST nodes

2019-12-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 10 inline comments as done. steveire added a comment. It wasn't possible to add the `const` because of the return type. Comment at: clang/include/clang/AST/Expr.h:769-770 + /// implicit conversions. + Expr *IgnoreInvisible(); + const Expr *IgnoreInvisible() c

[PATCH] D70613: Add method to ignore invisible AST nodes

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

[PATCH] D70613: Add method to ignore invisible AST nodes

2019-12-18 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG98e8f774eb6c: Add method to ignore invisible AST nodes (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D70613?vs=233183&id=234623#toc Repository: rG LLVM Github Monorepo

[PATCH] D71680: Customize simplified dumping and matching of LambdaExpr

2019-12-18 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. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D71680 Files: clang/include/clang/AST/ASTNodeTraverser.h clang/lib/ASTMatchers/ASTMa

[PATCH] D71680: Customize simplified dumping and matching of LambdaExpr

2019-12-18 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 234635. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71680/new/ https://reviews.llvm.org/D71680 Files: clang/include/clang/AST/ASTNodeTraverser.h clang/lib/ASTMatchers/AS

[PATCH] D71680: Customize simplified dumping and matching of LambdaExpr

2019-12-18 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 234636. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71680/new/ https://reviews.llvm.org/D71680 Files: clang/include/clang/AST/ASTNodeTraverser.h clang/lib/ASTMatchers/AS

[PATCH] D71680: Customize simplified dumping and matching of LambdaExpr

2019-12-20 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG494b1318ca77: Customize simplified dumping and matching of LambdaExpr (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D71680?vs=234636&id=234968#toc Repository: rG LLVM

[PATCH] D71842: Allow newlines in AST Matchers in clang-query files

2019-12-23 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. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D71842 Files: clang-tools-extra/clang-query/Query.cpp clang-tools-extra/clang-query/

[PATCH] D71842: Allow newlines in AST Matchers in clang-query files

2019-12-26 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 235353. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71842/new/ https://reviews.llvm.org/D71842 Files: clang-tools-extra/clang-query/Query.cpp clang-tools-extra/clang-que

[PATCH] D71842: Allow newlines in AST Matchers in clang-query files

2019-12-26 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 9 inline comments as done. steveire added inline comments. Comment at: clang-tools-extra/clang-query/Query.cpp:111 + } + int maxLength = firstLine.size(); std::string prefixText = "Matcher: "; aaron.ballman wrote: > `MaxLength` an

[PATCH] D71842: Allow newlines in AST Matchers in clang-query files

2019-12-26 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-query/QueryParser.cpp:243-244 -return new LetQuery(Name, Value); +auto Q = new LetQuery(Name, Value); +Q->RemainingContent = Line; +return Q; -

[PATCH] D71842: Allow newlines in AST Matchers in clang-query files

2019-12-26 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6a3ecf4dc7ec: Allow newlines in AST Matchers in clang-query files (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D71842?vs=235353&id=235370#toc Repository: rG LLVM Gith

[PATCH] D73028: Extract ExprTraversal class from Expr

2020-01-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. The current implementations are concerned with descending through the AST. An addition to the API will be concerned with ascending through the AS

[PATCH] D73029: Extend ExprTraversal class with acending traversal

2020-01-20 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. This allows ASTContext to store only one parent map, rather than storing an entire parent map for each traversal mode used. This is therefore a partial

[PATCH] D73029: Extend ExprTraversal class with acending traversal

2020-01-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 239075. steveire added a comment. Format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73029/new/ https://reviews.llvm.org/D73029 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/ExprTr

[PATCH] D73028: Extract ExprTraversal class from Expr

2020-01-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 239072. steveire added a comment. Format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73028/new/ https://reviews.llvm.org/D73028 Files: clang/include/clang/AST/ExprTraversal.h clang/lib/AST/CMakeLists.tx

[PATCH] D73037: Add a way to set traversal mode in clang-query

2020-01-20 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. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D73037 Files: clang-tools-extra/clang-query/Query.cpp clang-tools-extra/clang-query/

[PATCH] D73028: Extract ExprTraversal class from Expr

2020-01-24 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 240267. steveire added a comment. Update for review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73028/new/ https://reviews.llvm.org/D73028 Files: clang/include/clang/AST/Expr.h clang/include/cl

[PATCH] D73028: Extract ExprTraversal class from Expr

2020-01-24 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 240269. steveire marked an inline comment as done. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73028/new/ https://reviews.llvm.org/D73028 Files: clang/include/clang/AST/Ex

[PATCH] D73028: Extract ExprTraversal class from Expr

2020-01-24 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D73028#1839383 , @rsmith wrote: > > An addition to the API will be concerned with ascending through the AST in > > different traversal modes. > > Ascending through the AST is not possibly by design. (For example, we share > A

[PATCH] D73028: Extract ExprTraversal class from Expr

2020-01-24 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D73028#1839572 , @rsmith wrote: > In D73028#1839494 , @steveire wrote: > > > In D73028#1839383 , @rsmith wrote: > > > > > > > > > > > The follow-

[PATCH] D71313: [AST] Split parent map traversal logic into ParentMapContext.h

2020-01-24 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Should this new class have some tests? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71313/new/ https://reviews.llvm.org/D71313 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D73388: Implement AST node skipping in ParentMapContext

2020-01-24 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, rsmith, rnk. Herald added a project: clang. Herald added a subscriber: cfe-commits. steveire updated this revision to Diff 240318. steveire added a comment. constness This allows ASTContext to store only one parent map, rat

[PATCH] D73028: Extract ExprTraversal class from Expr

2020-01-24 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D73028#1839644 , @steveire wrote: > In D73028#1839572 , @rsmith wrote: > > > In D73028#1839494 , @steveire > > wrote: > > > > > In D73028#183938

[PATCH] D73388: Implement AST node skipping in ParentMapContext

2020-01-24 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 240318. steveire added a comment. constness Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73388/new/ https://reviews.llvm.org/D73388 Files: clang/include/clang/AST/ParentMapContext.h clang/lib/AST/ParentM

[PATCH] D73388: NFC: Implement AST node skipping in ParentMapContext

2020-01-25 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D73388#1840100 , @rsmith wrote: > This seems reasonable to me. > > If you want to unify something about this and the `Ignore*` functions in > `Expr`, maybe we could add a "classify" mechanism, so you could ask "what > kind of

[PATCH] D73388: NFC: Implement AST node skipping in ParentMapContext

2020-01-26 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf29204d3: NFC: Implement AST node skipping in ParentMapContext (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73388/new/ http

[PATCH] D72530: Set traversal explicitly where needed in clang-tidy

2020-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 240816. steveire added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72530/new/ https://reviews.llvm.org/D72530 Files: clang-tools-extra/clang-tidy/abseil/DurationDivisionCheck.cpp clang

[PATCH] D72531: Set traversal explicitly where needed in tests

2020-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 240841. steveire added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72531/new/ https://reviews.llvm.org/D72531 Files: clang/unittests/AST/ASTImporterTest.cpp clang/unittests/AST/SourceL

[PATCH] D98774: [AST] De-duplicate empty node introspection

2021-04-22 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGaee6c86c4dc7: [AST] De-duplicate empty node introspection (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D98774?vs=331300&id=339559#toc Repository: rG LLVM Github Monor

[PATCH] D98774: [AST] De-duplicate empty node introspection

2021-04-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D98774#2701853 , @thakis wrote: > I think it is? https://llvm.org/docs/GettingStarted.html#software lists it at > least. Thanks, I'll look into that soon and see how the buildbots respond. Repository: rG LLVM Github Monor

[PATCH] D101049: [AST] Add DeclarationNameInfo to node introspection

2021-04-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: njames93. Herald added a subscriber: mgrang. 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/D101049 Files:

[PATCH] D101049: [AST] Add DeclarationNameInfo to node introspection

2021-04-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 339563. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101049/new/ https://reviews.llvm.org/D101049 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling

[PATCH] D101054: [AST] Sort introspection results without instantiating other data

2021-04-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: njames93. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Avoid string allocation in particular, but also avoid attempting to impose any particular ordering based on format

[PATCH] D93325: Add srcloc output to clang-query

2021-04-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 339583. steveire added a comment. Herald added a subscriber: mgrang. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93325/new/ https://reviews.llvm.org/D93325 Files: clang-tools-extra/clang-query/CMak

[PATCH] D101049: [AST] Add DeclarationNameInfo to node introspection

2021-04-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 339793. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101049/new/ https://reviews.llvm.org/D101049 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling

[PATCH] D101054: [AST] Sort introspection results without instantiating other data

2021-04-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 rG35918bcb6f50: [AST] Sort introspection results without instantiating other data (authored by stephenkelly). Repository: rG LLVM Github Monorepo C

[PATCH] D101049: [AST] Add DeclarationNameInfo to node introspection

2021-04-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 340049. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101049/new/ https://reviews.llvm.org/D101049 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling

[PATCH] D101049: [AST] Add DeclarationNameInfo to node introspection

2021-04-25 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa9676febb99d: [AST] Add DeclarationNameInfo to node introspection (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101049/new/ http

[PATCH] D93325: Add srcloc output to clang-query

2021-04-25 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 rG8d018c79ee5f: Add srcloc output to clang-query (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D93325?vs=339583&id=3

[PATCH] D101346: [AST] Fix getExprLoc reported for cxxDependentScopeMemberExpr

2021-04-27 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. All other CallExpr use the location of the member name as the getExprLoc: https://godbolt.org/z/jx16G9Gdr Repos

[PATCH] D101346: [AST] Fix getExprLoc reported for cxxDependentScopeMemberExpr

2021-04-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 340762. steveire added a comment. Update test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101346/new/ https://reviews.llvm.org/D101346 Files: clang/include/clang/AST/ExprCXX.h clang/unittests/AST/Source

[PATCH] D101365: [clang-query] Add check to prevent setting srcloc when no introspection is available.

2021-04-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire accepted this revision. steveire added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang-tools-extra/unittests/clang-query/QueryParserTest.cpp:249 + EXPECT_EQ("dump ", Comps[3 + static_cast(HasIntrospection)].TypedText); + EXPECT_EQ(

[PATCH] D101346: [AST] Fix getExprLoc reported for cxxDependentScopeMemberExpr

2021-04-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 340994. steveire added a comment. Fix windows build Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101346/new/ https://reviews.llvm.org/D101346 Files: clang/include/clang/AST/ExprCXX.h clang/unittests/AST/

[PATCH] D100092: [clang-tidy] cppcoreguidelines-declare-loop-variable-in-the-initializer: a new check

2021-04-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. I implemented something like this recently too. The code I was trying to refactor was something like auto ii = 0; for (ii = 0; ii < thing.size(); ++ii) { // code } // code for (ii = 0; ii < thing.size(); ++ii) { // code } // code for (ii

[PATCH] D101572: Make `hasTypeLoc` matcher support nodes of type `CXXFunctionalCastExpr` and `CXXTemporaryObjectExpr`.

2021-04-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a reviewer: stephenkelly. steveire added a comment. According to llvm-project/clang/include/clang/AST$ git grep "TypeSourceInfo.*const" there are lots of other classes with `TypeSourceInfo` accessors which could be supported here. Should any others be supported? Is something sp

[PATCH] D101589: [AST] Add Concept-related locations to node introspection

2021-04-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: njames93. Herald added a subscriber: mgrang. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This would be less complicated if the ReturnTypeRequirement were not a nested c

[PATCH] D101572: Make `hasTypeLoc` matcher support nodes of type `CXXFunctionalCastExpr` and `CXXTemporaryObjectExpr`.

2021-04-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D101572#2730012 , @SilensAngelusNex wrote: > Yes, the motivation for adding these is so I can use clang-transformer to > refactor a bunch of constructor calls to call a static factory method instead. > > // Before > ns::

[PATCH] D101614: [clang-tidy][NFC] Simplify a lot of bugprone-sizeof-expression matchers

2021-04-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp:87 const auto IntegerExpr = ignoringParenImpCasts(integerLiteral()); - const auto ConstantExpr = expr(ignoringParenImpCasts( + const auto ConstantExpr = ignoringParenI

[PATCH] D101614: [clang-tidy][NFC] Simplify a lot of bugprone-sizeof-expression matchers

2021-05-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire accepted this revision. steveire added a comment. This revision is now accepted and ready to land. LGTM, but I think you could split it into 3 commits with a commit message saying what each is doing. "Simplify a lot of" doesn't say anything specific about what this patch does. It looks

[PATCH] D101572: Make `hasTypeLoc` matcher support more node types.

2021-05-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Please run `llvm-project/clang/docs/tools/dump_ast_matchers.py` to generate updated documentation for this (there is a `urlopen(url)` which slows things down, so I usually comment that out when running it). Do you have this on a git clone somewhere? It's easier to take

[PATCH] D101572: Make `hasTypeLoc` matcher support more node types.

2021-05-06 Thread Stephen Kelly via Phabricator via cfe-commits
steveire accepted this revision. steveire added a comment. This revision is now accepted and ready to land. This looks good to me. I tried running it in clang-query, which crashes with a matcher like m binaryOperator(hasEitherOperand(hasTypeLoc(loc(asString("int") but it also crashes befo

[PATCH] D101572: Make `hasTypeLoc` matcher support more node types.

2021-05-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 rG1f65f42dd37a: Make `hasTypeLoc` matcher support more node types. (authored by SilensAngelusNex, committed by stephenkelly). Changed prior to commit:

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

2021-05-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a reviewer: ymandel. steveire added a comment. Adding Yitzhak as a reviewer. I notice that at least the name of a cxxBaseSpecifier is not supported and I don't know if that (or lack of typeloc support) is desired in the Transformer design. Repository: rG LLVM Github Monorepo

[PATCH] D102213: [ASTMatchers] Add forCallable(), a generalization of forFunction().

2021-05-11 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. I'm not certain what strong opinions I've voiced on the mailing list about that. Was it just that I think `hasDescendant` can lead to unexpected matches and a more-specific matcher should always be used when available (such as `hasArgument`)? I do think `has`, `hasDesc

[PATCH] D97121: [clang-tidy] Add a Standalone diagnostics mode to clang-tidy

2021-03-16 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp:285 +#include "path/to/header2.h" +#include "path/to/header.h" + njames93 wrote: > steveire wrote: > > I still find it really confusing that the "single ins

[PATCH] D98296: [clang-tidy] Simplify readability checks to not need ignoring* matchers

2021-03-16 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 331130. steveire added a comment. Herald added a project: clang-tools-extra. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98296/new/ https://reviews.llvm.org/D98296 Files: clang-tools-extra/clang-ti

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-16 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D93164#2630203 , @nathanchance wrote: > I am seeing a spew of errors after 19740652c4c4329e2b9e77f96e5e31c360b4e8bb > (what > appears to be the latest ver

[PATCH] D98774: [AST] De-duplicate empty node introspection

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: thakis, njames93. Herald added a subscriber: mgorny. steveire requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This way we can add support for other nodes without du

[PATCH] D98775: [AST] Add introspection support for Decls

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: njames93. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The test code has lots of interesting locations which are not yet introspected, but those will come later: http:/

[PATCH] D98774: [AST] De-duplicate empty node introspection

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 331300. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98774/new/ https://reviews.llvm.org/D98774 Files: clang/lib/Tooling/CMakeLists.txt clang/lib/Tooling/DumpTool/generat

[PATCH] D98774: [AST] De-duplicate empty node introspection

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 4 inline comments as done. steveire added a comment. In D98774#2631898 , @thakis wrote: > Why were there two copies in the first place? What was the copy in the cmake > file good for, why wasn't the one written by generate_cxx_src_locs.py

[PATCH] D69218: [clang][AST] Add `CXXBaseSpecifier` matcher support

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added reviewers: steveire, njames93. steveire added a comment. Could you rebase this? Parts of it were common with another patch which was merged. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69218/new/ https://reviews.llvm.org/D69218 _

[PATCH] D98827: [AST] Ensure that an empty json file is generated if compile errors

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: njames93. 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/D98827 Files: clang/lib/Tooling/DumpTool/ASTSrc

[PATCH] D98775: [AST] Add introspection support for Decls

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 331413. steveire added a comment. Herald added a subscriber: mgorny. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98775/new/ https://reviews.llvm.org/D98775 Files: clang/include/clang/Tooling/NodeIn

[PATCH] D98827: [AST] Ensure that an empty json file is generated if compile errors

2021-03-18 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D98827#2635303 , @njames93 wrote: > Are there any tests that ensure something is always outputted? The test verifies that the generated c++ either gives no introspection data or introspection data which the test expects. Re

[PATCH] D98774: [AST] De-duplicate empty node introspection

2021-03-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added a comment. @thakis Do you have any more on this? Can we de-duplicate? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98774/new/ https://reviews.llvm.org/D98774 __

[PATCH] D98827: [AST] Ensure that an empty json file is generated if compile errors

2021-03-20 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG188405bc192d: [AST] Ensure that an empty json file is generated if compile errors (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D9

[PATCH] D98775: [AST] Add introspection support for Decls

2021-03-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 332119. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98775/new/ https://reviews.llvm.org/D98775 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D98775: [AST] Add introspection support for Decls

2021-03-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 332160. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98775/new/ https://reviews.llvm.org/D98775 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D98775: [AST] Add introspection support for Decls

2021-03-22 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4c65dfc895d0: [AST] Add introspection support for Decls (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D98775?vs=332160&id=332469#toc Repository: rG LLVM Github Monorep

[PATCH] D69218: [ASTMatchers] Add `cxxBaseSpecifier` matcher (non-top-level)

2021-03-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Does anything prevent this going in now? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69218/new/ https://reviews.llvm.org/D69218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[PATCH] D99231: [AST] Add introspection support for more base nodes

2021-03-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: njames93. Herald added a subscriber: mgorny. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Replace an assert for a CXXCtorInitializer SourceLocation with a condition, as

[PATCH] D97513: Add ConfigVersion.cmake files

2021-03-26 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Herald added a subscriber: dcaballe. Comment at: lld/cmake/modules/LLDConfigVersion.cmake.in:1 +set(PACKAGE_VERSION "@PACKAGE_VERSION@") + Did you consider using `write_basic_package_version_file` instead of adding these files?

[PATCH] D97513: Add ConfigVersion.cmake files

2021-03-26 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: lld/cmake/modules/LLDConfigVersion.cmake.in:1 +set(PACKAGE_VERSION "@PACKAGE_VERSION@") + steveire wrote: > Did you consider using `write_basic_package_version_file` instead of adding > these files? Ah, sorry, I see yo

[PATCH] D97513: Add ConfigVersion.cmake files

2021-03-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: flang/cmake/modules/CMakeLists.txt:15 # Generate FlangConfig.cmake for the build tree. +include(CMakePackageConfigHelpers) + Instead of including this multiple times, please add it to `AddLLVM.cmake`. That file is use

<    4   5   6   7   8   9   10   11   >