diff --git a/src/CppParser/Parser.cpp b/src/CppParser/Parser.cpp index e84fb8af..9792e986 100644 --- a/src/CppParser/Parser.cpp +++ b/src/CppParser/Parser.cpp @@ -2475,7 +2475,7 @@ Type* Parser::WalkType(clang::QualType QualType, const clang::TypeLoc* TL, TST->_template = static_cast(WalkDeclaration( Name.getAsTemplateDecl())); if (TS->isSugared()) - TST->desugared = GetQualifiedType(TS->desugar(), TL); + TST->desugared = GetQualifiedType(TS->getCanonicalTypeInternal(), TL); TypeLoc UTL, ETL, ITL; @@ -2518,7 +2518,7 @@ Type* Parser::WalkType(clang::QualType QualType, const clang::TypeLoc* TL, auto TST = new DependentTemplateSpecializationType(); if (TS->isSugared()) - TST->desugared = GetQualifiedType(TS->desugar(), TL); + TST->desugared = GetQualifiedType(TS->getCanonicalTypeInternal(), TL); TypeLoc UTL, ETL, ITL; @@ -2706,7 +2706,7 @@ Type* Parser::WalkType(clang::QualType QualType, const clang::TypeLoc* TL, auto UTT = new UnaryTransformType(); auto Loc = TL->getAs().getUnderlyingTInfo()->getTypeLoc(); - UTT->desugared = GetQualifiedType(UT->isSugared() ? UT->desugar() : UT->getBaseType(), &Loc); + UTT->desugared = GetQualifiedType(UT->isSugared() ? UT->getCanonicalTypeInternal() : UT->getBaseType(), &Loc); UTT->baseType = GetQualifiedType(UT->getBaseType(), &Loc); Ty = UTT; @@ -2733,7 +2733,7 @@ Type* Parser::WalkType(clang::QualType QualType, const clang::TypeLoc* TL, { auto AT = Type->getAs(); if (AT->isSugared()) - Ty = WalkType(AT->desugar()); + Ty = WalkType(AT->getCanonicalTypeInternal()); else return nullptr; break; diff --git a/tests/Common/Common.h b/tests/Common/Common.h index 8e32acd0..0b6117dd 100644 --- a/tests/Common/Common.h +++ b/tests/Common/Common.h @@ -1457,3 +1457,12 @@ class MyIntList : public MyList }; void MyFunc(MyList *list); + +template using InvokeGenSeq = typename T::Type; + +template struct DerivedTypeAlias; +template using TypeAlias = InvokeGenSeq>; + +template +struct DerivedTypeAlias : TypeAlias {}; +