]> granicus.if.org Git - clang/commit
[ASTMatcher] Add handling for DeducedType to HasDeclarationMatcher
authorFlorian Gross <fgross@noexcept.net>
Fri, 4 Aug 2017 18:59:19 +0000 (18:59 +0000)
committerFlorian Gross <fgross@noexcept.net>
Fri, 4 Aug 2017 18:59:19 +0000 (18:59 +0000)
commit46512077fc202c45d3aefe0bc820b47c85392132
tree0239a80f2ab3fd9e1aa2706b948a84689df26d82
parent84162ace309f1c79bc374a1d0cc19c2c91a32ee8
[ASTMatcher] Add handling for DeducedType to HasDeclarationMatcher

HasDeclarationMatcher did not handle DeducedType, it always returned false for deduced types.

So with code like this:
struct X{};
auto x = X{};

This did no longer match:
varDecl(hasType(recordDecl(hasName("X"))))

Because HasDeclarationMatcher didn't resolve the DeducedType of x.

Differential Revision: https://reviews.llvm.org/D36308

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310095 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/ASTMatchers/ASTMatchersInternal.h
unittests/ASTMatchers/ASTMatchersNodeTest.cpp