@@ -2328,15 +2328,7 @@ QualType Sema::CheckTemplateIdType(TemplateName Name,
2328
2328
// A<T, T> have identical types when A is declared as:
2329
2329
//
2330
2330
// 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);
2340
2332
2341
2333
// This might work out to be a current instantiation, in which
2342
2334
// case the canonical type needs to be the InjectedClassNameType.
@@ -3444,7 +3436,7 @@ SubstDefaultTemplateArgument(Sema &SemaRef,
3444
3436
SourceLocation TemplateLoc,
3445
3437
SourceLocation RAngleLoc,
3446
3438
TemplateTypeParmDecl *Param,
3447
- SmallVectorImpl<TemplateArgument> &Converted) {
3439
+ SmallVectorImpl<TemplateArgument> &Converted) {
3448
3440
TypeSourceInfo *ArgType = Param->getDefaultArgumentInfo ();
3449
3441
3450
3442
// If the argument type is dependent, instantiate it now based
0 commit comments