r291552 - Remove fixme, use ASTContext::getCanonicalTemplateSpecializationType.
Vassil Vassilev via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 10 01:09:10 PST 2017
Author: vvassilev
Date: Tue Jan 10 03:09:09 2017
New Revision: 291552
URL: http://llvm.org/viewvc/llvm-project?rev=291552&view=rev
Log:
Remove fixme, use ASTContext::getCanonicalTemplateSpecializationType.
Reviewed by Richard Smith (D28306).
Modified:
cfe/trunk/lib/Sema/SemaTemplate.cpp
Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=291552&r1=291551&r2=291552&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Tue Jan 10 03:09:09 2017
@@ -2328,15 +2328,7 @@ QualType Sema::CheckTemplateIdType(Templ
// A<T, T> have identical types when A is declared as:
//
// template<typename T, typename U = T> struct A;
- TemplateName CanonName = Context.getCanonicalTemplateName(Name);
- CanonType = Context.getTemplateSpecializationType(CanonName,
- Converted);
-
- // FIXME: CanonType is not actually the canonical type, and unfortunately
- // it is a TemplateSpecializationType that we will never use again.
- // In the future, we need to teach getTemplateSpecializationType to only
- // build the canonical type and return that to us.
- CanonType = Context.getCanonicalType(CanonType);
+ CanonType = Context.getCanonicalTemplateSpecializationType(Name, Converted);
// This might work out to be a current instantiation, in which
// case the canonical type needs to be the InjectedClassNameType.
@@ -3444,7 +3436,7 @@ SubstDefaultTemplateArgument(Sema &SemaR
SourceLocation TemplateLoc,
SourceLocation RAngleLoc,
TemplateTypeParmDecl *Param,
- SmallVectorImpl<TemplateArgument> &Converted) {
+ SmallVectorImpl<TemplateArgument> &Converted) {
TypeSourceInfo *ArgType = Param->getDefaultArgumentInfo();
// If the argument type is dependent, instantiate it now based
More information about the cfe-commits
mailing list