[PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Please commit with whatever patch makes use of `nodeConstructors()` (as this functionality doesn't stand on its own). Repository: rC Clang CHANGES SINCE LAST ACTION h

[PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: lib/ASTMatchers/Dynamic/Registry.cpp:85 +using DerivedT = typename ast_matchers::internal::VariadicAllOfMatcher::Type; +registerIfNodeMatcher(ASTNodeKind::getFromNodeKind(), Descripto

[PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 175429. steveire added a comment. Refactor Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54405/new/ https://reviews.llvm.org/D54405 Files: include/clang/ASTMatchers/ASTMatchersInternal.h lib/ASTMatchers/Dynamic/Registry

[PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-13 Thread Mailing List "cfe-commits" via Phabricator via cfe-commits
cfe-commits added a subscriber: aaron.ballman. cfe-commits added a comment. I don’t really have much more to add here except to refer you to the style guide: https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable Specifically this line: “Use auto if and onl

Re: [PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-13 Thread Zachary Turner via cfe-commits
I don’t really have much more to add here except to refer you to the style guide: https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable Specifically this line: “Use auto if and only if it makes the code more readable or easier to maintain.” Given that 2 ou

[PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-13 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: lib/ASTMatchers/Dynamic/Registry.cpp:77 + internal::MatcherDescriptor *matchDescriptor, StringRef MatcherName) { +auto K = ast_type_traits::ASTNodeKind::getFromNodeKind< +typename ast_matchers::internal::VariadicAllOfM

[PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-13 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 173819. steveire added a comment. Update Repository: rC Clang https://reviews.llvm.org/D54405 Files: include/clang/ASTMatchers/ASTMatchersInternal.h lib/ASTMatchers/Dynamic/Registry.cpp Index: lib/ASTMatchers/Dynamic/Registry.cpp =

[PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-12 Thread Zachary Turner via Phabricator via cfe-commits
zturner added inline comments. Comment at: lib/ASTMatchers/Dynamic/Registry.cpp:77 + internal::MatcherDescriptor *matchDescriptor, StringRef MatcherName) { +auto K = ast_type_traits::ASTNodeKind::getFromNodeKind< +typename ast_matchers::internal::VariadicAllOfMa

[PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: lib/ASTMatchers/Dynamic/Registry.cpp:77 + internal::MatcherDescriptor *matchDescriptor, StringRef MatcherName) { +auto K = ast_type_traits::ASTNodeKind::getFromNodeKind< +typename ast_matchers::internal::VariadicAllOfM

[PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/ASTMatchers/Dynamic/Registry.cpp:77 + internal::MatcherDescriptor *matchDescriptor, StringRef MatcherName) { +auto K = ast_type_traits::ASTNodeKind::getFromNodeKind< +typename ast_matchers::internal::VariadicA

[PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-12 Thread Zachary Turner via Phabricator via cfe-commits
zturner added inline comments. Comment at: lib/ASTMatchers/Dynamic/Registry.cpp:77 + internal::MatcherDescriptor *matchDescriptor, StringRef MatcherName) { +auto K = ast_type_traits::ASTNodeKind::getFromNodeKind< +typename ast_matchers::internal::VariadicAllOfMa

[PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: lib/ASTMatchers/Dynamic/Registry.cpp:77 + internal::MatcherDescriptor *matchDescriptor, StringRef MatcherName) { +auto K = ast_type_traits::ASTNodeKind::getFromNodeKind< +typename ast_matchers::internal::VariadicAllOfM

[PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Aside from the uses of auto and the lack of tests, this LGTM. Comment at: lib/ASTMatchers/Dynamic/Registry.cpp:77 + internal::MatcherDescriptor *matchDescriptor, StringRef MatcherName) { +auto K = ast_type_traits::ASTNodeKind::getFromNode

[PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 173767. steveire added a comment. Update Repository: rC Clang https://reviews.llvm.org/D54405 Files: include/clang/ASTMatchers/ASTMatchersInternal.h lib/ASTMatchers/Dynamic/Registry.cpp Index: lib/ASTMatchers/Dynamic/Registry.cpp =

[PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: lib/ASTMatchers/Dynamic/Registry.cpp:77 + internal::MatcherDescriptor *matchDescriptor, StringRef MatcherName) { +auto K = ast_type_traits::ASTNodeKind::getFromNodeKind< +typename ast_matchers::internal::VariadicAllOfM

[PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/ASTMatchers/Dynamic/Registry.cpp:70 + void registerIfNodeMatcher(MatcherType, + internal::MatcherDescriptor *matchDescriptor, + StringRef) {} Fix `matchD

[PATCH] D54405: Record whether a AST Matcher constructs a Node

2018-11-11 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. These matchers are bindable. Recording this information will make it possible to introspect the matchers which can be used inside another matcher. Repository: rC Clang https://rev