@@ -2475,7 +2475,7 @@ Type* Parser::WalkType(clang::QualType QualType, const clang::TypeLoc* TL,
24752475 TST->_template = static_cast <Template*>(WalkDeclaration (
24762476 Name.getAsTemplateDecl ()));
24772477 if (TS->isSugared ())
2478- TST->desugared = GetQualifiedType (TS->desugar (), TL);
2478+ TST->desugared = GetQualifiedType (TS->getCanonicalTypeInternal (), TL);
24792479
24802480 TypeLoc UTL, ETL, ITL;
24812481
@@ -2518,7 +2518,7 @@ Type* Parser::WalkType(clang::QualType QualType, const clang::TypeLoc* TL,
25182518 auto TST = new DependentTemplateSpecializationType ();
25192519
25202520 if (TS->isSugared ())
2521- TST->desugared = GetQualifiedType (TS->desugar (), TL);
2521+ TST->desugared = GetQualifiedType (TS->getCanonicalTypeInternal (), TL);
25222522
25232523 TypeLoc UTL, ETL, ITL;
25242524
@@ -2706,7 +2706,7 @@ Type* Parser::WalkType(clang::QualType QualType, const clang::TypeLoc* TL,
27062706
27072707 auto UTT = new UnaryTransformType ();
27082708 auto Loc = TL->getAs <UnaryTransformTypeLoc>().getUnderlyingTInfo ()->getTypeLoc ();
2709- UTT->desugared = GetQualifiedType (UT->isSugared () ? UT->desugar () : UT->getBaseType (), &Loc);
2709+ UTT->desugared = GetQualifiedType (UT->isSugared () ? UT->getCanonicalTypeInternal () : UT->getBaseType (), &Loc);
27102710 UTT->baseType = GetQualifiedType (UT->getBaseType (), &Loc);
27112711
27122712 Ty = UTT;
@@ -2733,7 +2733,7 @@ Type* Parser::WalkType(clang::QualType QualType, const clang::TypeLoc* TL,
27332733 {
27342734 auto AT = Type->getAs <clang::AutoType>();
27352735 if (AT->isSugared ())
2736- Ty = WalkType (AT->desugar ());
2736+ Ty = WalkType (AT->getCanonicalTypeInternal ());
27372737 else
27382738 return nullptr ;
27392739 break ;
0 commit comments