aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-03-19 00:39:20 +0000
committerDouglas Gregor <dgregor@apple.com>2009-03-19 00:39:20 +0000
commite6258936178b4c52b43b3b9dbec13552961cd645 (patch)
tree4ca4bb163b6ec04f57e3e982bbe3396754e19d91 /lib/Sema/SemaTemplate.cpp
parentc20482b10ee4ffcea31f67392743ccdf6df1f7f4 (diff)
Extend the use of QualifiedNameType to the creation of class template
specialization names. This way, we keep track of sugared types like std::vector<Real> I believe we are now using QualifiedNameTypes everywhere we can. Next step: QualifiedDeclRefExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67268 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index f5317787ba..b4e505e7c2 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -765,6 +765,9 @@ Sema::ActOnClassTemplateId(DeclTy *TemplateD, SourceLocation TemplateLoc,
&TemplateArgs[0],
TemplateArgs.size(),
RAngleLoc);
+
+ if (SS)
+ Result = getQualifiedNameType(*SS, Result);
TemplateArgsIn.release();
return Result.getAsOpaquePtr();
@@ -1910,11 +1913,12 @@ Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagKind TK,
// actually wrote the specialization, rather than formatting the
// name based on the "canonical" representation used to store the
// template arguments in the specialization.
- Specialization->setTypeAsWritten(
- Context.getClassTemplateSpecializationType(ClassTemplate,
- &TemplateArgs[0],
- TemplateArgs.size(),
- Context.getTypeDeclType(Specialization)));
+ QualType WrittenTy
+ = Context.getClassTemplateSpecializationType(ClassTemplate,
+ &TemplateArgs[0],
+ TemplateArgs.size(),
+ Context.getTypeDeclType(Specialization));
+ Specialization->setTypeAsWritten(getQualifiedNameType(SS, WrittenTy));
TemplateArgsIn.release();
// C++ [temp.expl.spec]p9: