[cfe-commits] r160241 - /cfe/trunk/lib/AST/Type.cpp
Richard Smith
richard-llvm at metafoo.co.uk
Sun Jul 15 16:30:50 PDT 2012
Author: rsmith
Date: Sun Jul 15 18:30:50 2012
New Revision: 160241
URL: http://llvm.org/viewvc/llvm-project?rev=160241&view=rev
Log:
Revert change accidentally committed in r160240.
Modified:
cfe/trunk/lib/AST/Type.cpp
Modified: cfe/trunk/lib/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Type.cpp?rev=160241&r1=160240&r2=160241&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Type.cpp (original)
+++ cfe/trunk/lib/AST/Type.cpp Sun Jul 15 18:30:50 2012
@@ -1862,7 +1862,8 @@
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 @@
// arguments is. Given:
// template<typename T> using U = int;
// U<T> is always non-dependent, irrespective of the type T.
- // However, U<Ts> 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 @@
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]);
More information about the cfe-commits
mailing list