================
@@ -3990,9 +3991,16 @@ QualType Sema::CheckTemplateIdType(TemplateName Name,
     if (Inst.isInvalid())
       return QualType();
 
-    CanonType = SubstType(Pattern->getUnderlyingType(),
-                          TemplateArgLists, AliasTemplate->getLocation(),
-                          AliasTemplate->getDeclName());
+    if (!RebuildingTypesInCurrentInstantiation) {
----------------
erichkeane wrote:

This is probably better/less likely to be screwed up in the future if we 
instead immediately do a 'SavedContext.pop()` if this condition is true, which 
leaves the SubstType code from being repeated/accidentially diverging.

https://github.com/llvm/llvm-project/pull/75069
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to