Make sure we correctly expand packs which expand to another
pack in a function type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186728
91177308-0d34-0410-b5e6-
96231b3b80d8
if (NewType.isNull())
return true;
+ if (NewType->containsUnexpandedParameterPack())
+ NewType = getSema().Context.getPackExpansionType(NewType,
+ NumExpansions);
+
OutParamTypes.push_back(NewType);
if (PVars)
PVars->push_back(0);
}
}
}
+
+namespace VariadicAliasWithFunctionType {
+ template <class T> struct A { };
+ template <class ...Args> using B = A<int(Args ...x)>;
+ template <class ...Args> void f(B<A<int>, A<Args>...>) {}
+ void g() { f(A<int(A<int>,A<int>)>()); }
+}