From: Richard Smith Date: Sun, 15 Jul 2012 23:30:50 +0000 (+0000) Subject: Revert change accidentally committed in r160240. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=912394028ddd1934d40ad3d44c6655472cae9ef7;p=clang Revert change accidentally committed in r160240. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160241 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index eacf505442..4fef11f2a8 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -1862,7 +1862,8 @@ TemplateSpecializationType(TemplateName T, Canon.isNull()? T.isDependent() : Canon->isInstantiationDependentType(), false, - T.containsUnexpandedParameterPack()), + Canon.isNull()? T.containsUnexpandedParameterPack() + : Canon->containsUnexpandedParameterPack()), Template(T), NumArgs(NumArgs), TypeAlias(!AliasedType.isNull()) { assert(!T.getAsDependentTemplateName() && "Use DependentTemplateSpecializationType for dependent template-name"); @@ -1887,8 +1888,6 @@ TemplateSpecializationType(TemplateName T, // arguments is. Given: // template using U = int; // U is always non-dependent, irrespective of the type T. - // However, U contains an unexpanded parameter pack, even though - // its expansion (and thus its desugared type) doesn't. if (Canon.isNull() && Args[Arg].isDependent()) setDependent(); else if (Args[Arg].isInstantiationDependent()) @@ -1897,7 +1896,7 @@ TemplateSpecializationType(TemplateName T, if (Args[Arg].getKind() == TemplateArgument::Type && Args[Arg].getAsType()->isVariablyModifiedType()) setVariablyModified(); - if (Args[Arg].containsUnexpandedParameterPack()) + if (Canon.isNull() && Args[Arg].containsUnexpandedParameterPack()) setContainsUnexpandedParameterPack(); new (&TemplateArgs[Arg]) TemplateArgument(Args[Arg]);