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
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
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
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.
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
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;\
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
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
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