]> granicus.if.org Git - clang/commit
Fix up ClassTemplateSpecializationDecl: For implicit instantiations
authorCraig Silverstein <csilvers2000@yahoo.com>
Mon, 28 Jun 2010 23:42:10 +0000 (23:42 +0000)
committerCraig Silverstein <csilvers2000@yahoo.com>
Mon, 28 Jun 2010 23:42:10 +0000 (23:42 +0000)
commitbc55618eb97c519b8c186c350cb419f89021b073
tree3201e45a184d13b623c500a20eb9ec9d7f74c069
parent6ae0069f5db96b8ed5adc598d576e695e5ac4134
Fix up ClassTemplateSpecializationDecl: For implicit instantiations
("set<int> x;"), we don't want to recurse at all, since the
instatiated class isn't written in the source code anywhere.  (Note
the instatiated *type* -- set<int> -- is written, and will still get a
callback of TemplateSpecializationType).  For explicit instantiations
("template set<int>;"), we do need a callback, since this is the only
callback that's made for this instantiation.  We use
getTypeAsWritten() to distinguish.

We will still need to figure out how to handle template
specializations, which probably are still not quite correct.

Reviewed by chandlerc

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