[PATCH] D26032: [ASTMatcher] Add CXXNewExpr support to hasDeclaration

2016-10-31 Thread Łukasz Anforowicz via cfe-commits
lukasza added a comment. FWIW, a non-owner LGTM: - CXXNewExpr seems very similar to CallExpr, so it makes sense that hasDeclaration would behave similarily for both of these expressions (i.e. matching the "callee") - The issues we've been trying to work through in https://reviews.llvm.org/D243

[PATCH] D24361: hasDeclaration(qualType(...)) matcher should unwrap ElaboratedType and TemplateSpecializationType

2016-10-25 Thread Łukasz Anforowicz via cfe-commits
lukasza updated the summary for this revision. lukasza updated this revision to Diff 75661. lukasza added a comment. Reverted changes in the patch that are not related to the issue of hasDeclaration not matching *anything* in some cases. https://reviews.llvm.org/D24361 Files: include/clang/A

[PATCH] D24361: hasDeclaration(qualType(...)) matcher should unwrap ElaboratedType and TemplateSpecializationType

2016-10-04 Thread Łukasz Anforowicz via cfe-commits
lukasza added a comment. Richard - what are the next steps for this patch? https://reviews.llvm.org/D24361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24361: hasDeclaration(qualType(...)) matcher should unwrap ElaboratedType and TemplateSpecializationType

2016-09-26 Thread Łukasz Anforowicz via cfe-commits
lukasza added inline comments. Comment at: unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:2119 @@ +2118,3 @@ + "template \n" + "void Function(Namespace::Template param) {\n" + " param.Method();\n" klimek wrote: > Given your use case: why do we

Re: [PATCH] D24361: hasDeclaration(qualType(...)) matcher should unwrap ElaboratedType and TemplateSpecializationType

2016-09-23 Thread Łukasz Anforowicz via cfe-commits
lukasza updated the summary for this revision. lukasza updated this revision to Diff 72350. lukasza marked an inline comment as done. lukasza added a comment. - Added test where both TemplateSpecializationType and TypedefType are present and both should match regardless of code order inside HasD

Re: [PATCH] D24361: hasDeclaration(qualType(...)) matcher should unwrap ElaboratedType and TemplateSpecializationType

2016-09-23 Thread Łukasz Anforowicz via cfe-commits
lukasza added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:750 @@ +749,3 @@ +else if (auto *ET = Node->getAs()) + return matchesSpecialized(ET->getNamedType(), Finder, Builder); +else if (auto *TST = Node->getAs()) luka

Re: [PATCH] D24361: hasDeclaration(qualType(...)) matcher should unwrap ElaboratedType and TemplateSpecializationType

2016-09-17 Thread Łukasz Anforowicz via cfe-commits
lukasza added a comment. Richard, could you please take a look? Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:750 @@ +749,3 @@ +else if (auto *ET = Node->getAs()) + return matchesSpecialized(ET->getNamedType(), Finder, Builder); +else if (auto *TST = N

Re: [PATCH] D24268: Traversing template paramter lists of DeclaratorDecls and/or TagDecls.

2016-09-07 Thread Łukasz Anforowicz via cfe-commits
lukasza added a comment. In https://reviews.llvm.org/D24268#535463, @rsmith wrote: > This patch looks great, thank you! Do you have an SVN account or do you need > someone to commit this for you? I don't have an SVN account. Could you please commit the patch for me? https://reviews.llvm.org

Re: [PATCH] D24268: Traversing template paramter lists of DeclaratorDecls and/or TagDecls.

2016-09-06 Thread Łukasz Anforowicz via cfe-commits
lukasza added inline comments. Comment at: include/clang/AST/RecursiveASTVisitor.h:487-489 @@ +486,5 @@ + // Traverses template parameter lists of either a DeclaratorDecl or TagDecl. + template ::value || + std::is_base_of::value>::type> + bool TraverseDeclTemplateParamete

Re: [PATCH] D24268: Traversing template paramter lists of DeclaratorDecls and/or TagDecls.

2016-09-06 Thread Łukasz Anforowicz via cfe-commits
lukasza added inline comments. Comment at: include/clang/AST/RecursiveASTVisitor.h:1728 @@ -1708,2 +1727,3 @@ + TRY_TO(TraverseDeclTemplateParameterLists(D)); TRY_TO(TraverseNestedNameSpecifierLoc(D->getQualifierLoc())); I think that tweaks of EnumDecl trave

Re: [PATCH] D24268: Traversing template paramter lists of DeclaratorDecls and/or TagDecls.

2016-09-06 Thread Łukasz Anforowicz via cfe-commits
lukasza updated the summary for this revision. lukasza updated this revision to Diff 70483. lukasza added a comment. Addressing CR feedbackfrom rsmith@. https://reviews.llvm.org/D24268 Files: include/clang/AST/RecursiveASTVisitor.h unittests/ASTMatchers/ASTMatchersTraversalTest.cpp Index:

[PATCH] D24268: Traversing template paramter lists of DeclaratorDecls and/or TagDecls.

2016-09-06 Thread Łukasz Anforowicz via cfe-commits
lukasza created this revision. lukasza added a reviewer: rsmith. lukasza added a subscriber: cfe-commits. Herald added a subscriber: klimek. The unit tests in this patch demonstrate the need to traverse template parameter lists of DeclaratorDecls (e.g. VarDecls, CXXMethodDecls) and TagDecls (e.g.