aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Type.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-03-31 00:43:58 +0000
committerDouglas Gregor <dgregor@apple.com>2009-03-31 00:43:58 +0000
commitc45c232440dfafedca1a3773b904fb42609b1b19 (patch)
tree8fc8ee76514079ac19b30b1200dddedd6f74dece /lib/AST/Type.cpp
parentaf3e72285238369c2ea4ebd40a1c9a87bd3eabb7 (diff)
Parsing and AST representation for dependent template names that occur
within nested-name-specifiers, e.g., for the "apply" in typename MetaFun::template apply<T1, T2>::type At present, we can't instantiate these nested-name-specifiers, so our testing is sketchy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r--lib/AST/Type.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index 6922dcc6c0..a4117b2bdf 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -94,8 +94,12 @@ QualType Type::getDesugaredType() const {
if (const TypeOfType *TOT = dyn_cast<TypeOfType>(this))
return TOT->getUnderlyingType().getDesugaredType();
if (const TemplateSpecializationType *Spec
- = dyn_cast<TemplateSpecializationType>(this))
- return Spec->getCanonicalTypeInternal().getDesugaredType();
+ = dyn_cast<TemplateSpecializationType>(this)) {
+ QualType Canon = Spec->getCanonicalTypeInternal();
+ if (Canon->getAsTemplateSpecializationType())
+ return QualType(this, 0);
+ return Canon->getDesugaredType();
+ }
if (const QualifiedNameType *QualName = dyn_cast<QualifiedNameType>(this))
return QualName->getNamedType().getDesugaredType();