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

2021-05-11 Thread Weston Carvalho via Phabricator via cfe-commits
SilensAngelusNex updated this revision to Diff 344486. SilensAngelusNex added a comment. `T->` => `Loc.` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102185/new/ https://reviews.llvm.org/D102185 Files: clang/include/clang/Tooling/Transformer/Ra

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

2021-05-10 Thread Weston Carvalho via Phabricator via cfe-commits
SilensAngelusNex updated this revision to Diff 344132. SilensAngelusNex added a comment. Fix typo in `name`'s doc comment and add `TypeLoc` to the list of expected types in `name`'s `typeError`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102185/

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

2021-05-10 Thread Weston Carvalho via Phabricator via cfe-commits
SilensAngelusNex created this revision. SilensAngelusNex 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/D102185 Files: clang/include/clang/Tooling/Transformer/RangeSelector

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

2021-05-07 Thread Weston Carvalho via Phabricator via cfe-commits
SilensAngelusNex added a comment. I don't have commit access; you can go ahead and submit it. Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101572/new/ https://reviews.llvm.org/D101572 __

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

2021-05-05 Thread Weston Carvalho via Phabricator via cfe-commits
SilensAngelusNex added a comment. Here's my branch on Github: https://github.com/SilensAngelusNex/llvm-project/tree/has-type-info Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:138-150 +template struct disjunction; +template struct disjunction : public T {

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

2021-05-05 Thread Weston Carvalho via Phabricator via cfe-commits
SilensAngelusNex updated this revision to Diff 343219. SilensAngelusNex marked 2 inline comments as done. SilensAngelusNex added a comment. Regenerate docs and replace `is_one_of` with `TypeListContainsSuperOf`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

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

2021-05-05 Thread Weston Carvalho via Phabricator via cfe-commits
SilensAngelusNex updated this revision to Diff 343106. SilensAngelusNex added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101572/new/ https://reviews.llvm.org/D101572 Files: clang/include/clang/ASTMatchers/ASTMatchers.h cla

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

2021-05-04 Thread Weston Carvalho via Phabricator via cfe-commits
SilensAngelusNex added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:138-150 +template struct disjunction; +template struct disjunction : public T {}; +template struct disjunction { + using type = + typename std::conditional>::type; +

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

2021-05-04 Thread Weston Carvalho via Phabricator via cfe-commits
SilensAngelusNex updated this revision to Diff 342790. SilensAngelusNex retitled this revision from "Make `hasTypeLoc` matcher support nodes of type `CXXFunctionalCastExpr` and `CXXTemporaryObjectExpr`." to "Make `hasTypeLoc` matcher support more node types.". SilensAngelusNex added a comment. A

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

2021-04-30 Thread Weston Carvalho via Phabricator via cfe-commits
SilensAngelusNex added a comment. 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::Foo x(1); auto y = ns::Foo(1, 2); // After auto x = ns::Foo::Make(1); auto y = n

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

2021-04-29 Thread Weston Carvalho via Phabricator via cfe-commits
SilensAngelusNex created this revision. SilensAngelusNex 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/D101572 Files: clang/include/clang/ASTMatchers/ASTMatchers.h clang