@@ -2328,15 +2328,7 @@ QualType Sema::CheckTemplateIdType(TemplateName Name,
23282328 // A<T, T> have identical types when A is declared as:
23292329 //
23302330 // template<typename T, typename U = T> struct A;
2331- TemplateName CanonName = Context.getCanonicalTemplateName (Name);
2332- CanonType = Context.getTemplateSpecializationType (CanonName,
2333- Converted);
2334-
2335- // FIXME: CanonType is not actually the canonical type, and unfortunately
2336- // it is a TemplateSpecializationType that we will never use again.
2337- // In the future, we need to teach getTemplateSpecializationType to only
2338- // build the canonical type and return that to us.
2339- CanonType = Context.getCanonicalType (CanonType);
2331+ CanonType = Context.getCanonicalTemplateSpecializationType (Name, Converted);
23402332
23412333 // This might work out to be a current instantiation, in which
23422334 // case the canonical type needs to be the InjectedClassNameType.
@@ -3444,7 +3436,7 @@ SubstDefaultTemplateArgument(Sema &SemaRef,
34443436 SourceLocation TemplateLoc,
34453437 SourceLocation RAngleLoc,
34463438 TemplateTypeParmDecl *Param,
3447- SmallVectorImpl<TemplateArgument> &Converted) {
3439+ SmallVectorImpl<TemplateArgument> &Converted) {
34483440 TypeSourceInfo *ArgType = Param->getDefaultArgumentInfo ();
34493441
34503442 // If the argument type is dependent, instantiate it now based
0 commit comments