[PATCH] D17163: [ASTMatchers] Add matcher hasAnyName.
Manuel Klimek via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 12 03:40:31 PST 2016
klimek added inline comments.
================
Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:408
@@ +407,3 @@
+ PatternSet Patterns(Names);
+
+ llvm::SmallString<128> Scratch;
----------------
That empty line confuses me for some reason.
================
Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:443
@@ -378,12 +442,3 @@
if (!isa<ClassTemplateSpecializationDecl>(Ctx)) {
- if (RD->getIdentifier()) {
- if (ConsumeNameSuffix(Pattern, RD->getName()))
- continue;
- } else {
- llvm::SmallString<128> NodeName;
- NodeName += StringRef("(anonymous ");
- NodeName += RD->getKindName();
- NodeName += ')';
- if (ConsumeNameSuffix(Pattern, NodeName))
- continue;
- }
+ if (Patterns.consumeNameSuffix(getNodeName(*RD, Scratch), false))
+ continue;
----------------
Here and elsewhere: please annotate all bool parameters with comments about their names, or use enums /*AllowFullyQualified=*/
http://reviews.llvm.org/D17163
More information about the cfe-commits
mailing list