]> granicus.if.org Git - clang/commit
RecursiveASTVisitor: Visit instantiations of member templates of class
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 24 Apr 2012 20:39:49 +0000 (20:39 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 24 Apr 2012 20:39:49 +0000 (20:39 +0000)
commit5482dc3a88fce51307b5e1e19bdf72dea1562040
tree528f3a6a73d93be6d4fa4b81e26aeeb9171de424
parent4fe261cb0a6420b103335acc1f6bcb7b72188184
RecursiveASTVisitor: Visit instantiations of member templates of class
templates. In an implicit instantiation of a member class, any member
templates don't get instantiated, so the existing check which only visited
the instantiations of a defined template skipped these templates'
instantiations.

Since there is only a single declaration of a member template of a class
template specialization, just use that to determine whether to visit the
instantiations. This introduces a slight inconsistency in that we will
visit the instantiations of such templates whether or not they are
defined, but we never visit a declared-but-not-defined instantiation, so
this turns out to not matter.

Patch by Daniel Jasper!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155487 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/RecursiveASTVisitor.h
unittests/Tooling/RecursiveASTVisitorTest.cpp