]> granicus.if.org Git - clang/commitdiff
Remove fixme, use ASTContext::getCanonicalTemplateSpecializationType.
authorVassil Vassilev <v.g.vassilev@gmail.com>
Tue, 10 Jan 2017 09:09:09 +0000 (09:09 +0000)
committerVassil Vassilev <v.g.vassilev@gmail.com>
Tue, 10 Jan 2017 09:09:09 +0000 (09:09 +0000)
Reviewed by Richard Smith (D28306).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291552 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplate.cpp

index fd086a4f7f77de965c2bc0f65b0ac12cf5420910..447ed890d60f357fd41ee1680e38a36dc6bbea9f 100644 (file)
@@ -2328,15 +2328,7 @@ QualType Sema::CheckTemplateIdType(TemplateName Name,
     // 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 &SemaRef,
                              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