================
@@ -4710,29 +4712,25 @@ bool 
TemplateSpecializationType::anyInstantiationDependentTemplateArguments(
   return false;
 }
 
-static TypeDependence
-getTemplateSpecializationTypeDependence(QualType Underlying, TemplateName T) {
-  TypeDependence D = Underlying.isNull()
-                         ? TypeDependence::DependentInstantiation
-                         : toSemanticDependence(Underlying->getDependence());
-  D |= toTypeDependence(T.getDependence()) & TypeDependence::UnexpandedPack;
-  if (isPackProducingBuiltinTemplateName(T)) {
-    if (Underlying.isNull()) // Dependent, will produce a pack on substitution.
-      D |= TypeDependence::UnexpandedPack;
-    else
-      D |= (Underlying->getDependence() & TypeDependence::UnexpandedPack);
-  }
-  return D;
-}
-
 TemplateSpecializationType::TemplateSpecializationType(
     ElaboratedTypeKeyword Keyword, TemplateName T, bool IsAlias,
     ArrayRef<TemplateArgument> Args, QualType Underlying)
-    : TypeWithKeyword(Keyword, TemplateSpecialization,
-                      Underlying.isNull() ? QualType(this, 0)
-                                          : Underlying.getCanonicalType(),
-                      getTemplateSpecializationTypeDependence(Underlying, T)),
+    : TypeWithKeyword(
+          Keyword, TemplateSpecialization,
+          Underlying.isNull() ? QualType(this, 0)
+                              : Underlying.getCanonicalType(),
+          toSyntacticDependence(toTypeDependence(T.getDependence()))),
       Template(T) {
+  addDependence(Underlying.isNull()
+                    ? TypeDependence::DependentInstantiation
+                    : toSemanticDependence(Underlying->getDependence()));
+
+  // FIXME: Ugly hack, pack producing templates break the syntactic/semantic
+  // dependence distinction.
----------------
mizvekov wrote:

That's not the same thing the comment is saying.

https://github.com/llvm/llvm-project/pull/190495
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to