summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/mangle-alias-template.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-02-03 17:16:23 +0000
committerDouglas Gregor <dgregor@apple.com>2012-02-03 17:16:23 +0000
commit1f79ca839cb2d5a0c3a6392821c5ce60adaa4174 (patch)
tree7cc080c69954f8c223c2100e65b8a45db1b3f957 /clang/test/CodeGenCXX/mangle-alias-template.cpp
parente340deedbfa008cf22d7048adf9e130dc3ed241c (diff)
downloadbcm5719-llvm-1f79ca839cb2d5a0c3a6392821c5ce60adaa4174.tar.gz
bcm5719-llvm-1f79ca839cb2d5a0c3a6392821c5ce60adaa4174.zip
When a pack expansion occurs in the template argument list of an alias
template without a corresponding parameter pack, don't immediately substitute the alias template. This is under discussion in the C++ committee, and may become ill-formed, but for now we match GCC. llvm-svn: 149697
Diffstat (limited to 'clang/test/CodeGenCXX/mangle-alias-template.cpp')
-rw-r--r--clang/test/CodeGenCXX/mangle-alias-template.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/mangle-alias-template.cpp b/clang/test/CodeGenCXX/mangle-alias-template.cpp
index 1143ea114a1..5ace0b01cc2 100644
--- a/clang/test/CodeGenCXX/mangle-alias-template.cpp
+++ b/clang/test/CodeGenCXX/mangle-alias-template.cpp
@@ -11,6 +11,10 @@ template<typename T> void g(T);
template<template<typename> class F> void h(F<int>);
+template<typename,typename,typename> struct S {};
+template<typename T, typename U> using U = S<T, int, U>;
+template<typename...Ts> void h(U<Ts...>, Ts...);
+
// CHECK: define void @_Z1zv(
void z() {
vector<int> VI;
@@ -38,4 +42,7 @@ void z() {
Vec<Vec<int>> VVI;
g(VVI);
// CHECK: call void @_Z1gI6vectorIS0_Ii5allocIiEES1_IS3_EEEvT_(
+
+ // CHECK: call void @_Z1hIJidEEv1UIDpT_ES2_
+ h({}, 0, 0.0);
}
OpenPOWER on IntegriCloud