[PATCH] D27104: Unify and simplify the behavior of the hasDeclaration matcher.

2017-08-02 Thread Manuel Klimek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL309809: Unify and simplify the behavior of the hasDeclaration matcher. (authored by klimek). Changed prior to commit: https://reviews.llvm.org/D27104?vs=108608&id=109325#toc Repository: rL LLVM http

[PATCH] D27104: Unify and simplify the behavior of the hasDeclaration matcher.

2017-07-28 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg under the precondition that clang-tidy tests still work. https://reviews.llvm.org/D27104 ___ cfe-commits mailing list cfe-commits@lists.llvm

[PATCH] D27104: Unify and simplify the behavior of the hasDeclaration matcher.

2017-07-28 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a reviewer: bkramer. klimek added a comment. Adding Ben as reviewer. https://reviews.llvm.org/D27104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27104: Unify and simplify the behavior of the hasDeclaration matcher.

2017-07-28 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 108608. klimek added a comment. Update to handle hasDeclaration for type alias template decls. https://reviews.llvm.org/D27104 Files: include/clang/ASTMatchers/ASTMatchers.h include/clang/ASTMatchers/ASTMatchersInternal.h unittests/AST/ASTImporterTest.

[PATCH] D27104: Unify and simplify the behavior of the hasDeclaration matcher.

2016-11-29 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza added a comment. Do we also need to update the documentation (e.g. to say that ElaboratedType is covered by hasDeclaration)? Other than that, I think this CL LGTM, although I would like to have a specific, working equivalent of the old, deep-maching hasDeclaration (at least when the in

[PATCH] D27104: Unify and simplify the behavior of the hasDeclaration matcher.

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D27104#607161, @lukasza wrote: > Forcing shallow matching means that unit test below will stop passing after > this CL. > > TEST(HasDeclaration, DeepTagType) { > std::string input = > "class Foo {};\n" > "using Bar = Foo;\

[PATCH] D27104: Unify and simplify the behavior of the hasDeclaration matcher.

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 79530. klimek added a comment. Add tests, update hasDeclaration to work for ElaboratedType. https://reviews.llvm.org/D27104 Files: include/clang/ASTMatchers/ASTMatchersInternal.h unittests/ASTMatchers/ASTMatchersTraversalTest.cpp Index: unittests/ASTMat

[PATCH] D27104: Unify and simplify the behavior of the hasDeclaration matcher.

2016-11-28 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza added a comment. Forcing shallow matching means that unit test below will stop passing after this CL. TEST(HasDeclaration, DeepTagType) { std::string input = "class Foo {};\n" "using Bar = Foo;\n" "void Function(Bar param) {}\n"; // Matcher for declar

[PATCH] D27104: Unify and simplify the behavior of the hasDeclaration matcher.

2016-11-24 Thread Manuel Klimek via cfe-commits
klimek created this revision. klimek added reviewers: rsmith, lukasza. klimek added a subscriber: cfe-commits. Originally, we weren't able to match on Type nodes themselves (only QualType), so the hasDeclaration matcher was initially written to give what we thought are reasonable results for QualT