summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2016-07-05 17:57:24 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2016-07-05 17:57:24 +0000
commitf1bd000f7153cf608b050214e42475731188febc (patch)
tree9abc20cbf20a9c45779286522cab1e114690b427 /clang/test/CXX
parent2a15ffa2bf48a9804abcd5c1af011e712d5d1673 (diff)
downloadbcm5719-llvm-f1bd000f7153cf608b050214e42475731188febc.tar.gz
bcm5719-llvm-f1bd000f7153cf608b050214e42475731188febc.zip
[Sema] Fix a bug where pack expansion was not expanded in type alias
The problem is that the parameter pack in a function type type alias is not reexpanded after being transformed. Also remove an incorrect comment in a similar function. Fixes PR26017. Differential Revision: http://reviews.llvm.org/D21030 llvm-svn: 274566
Diffstat (limited to 'clang/test/CXX')
-rw-r--r--clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp b/clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp
index 4f9368f6b60..206e9f73e9f 100644
--- a/clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp
+++ b/clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp
@@ -437,3 +437,35 @@ namespace PR21289 {
template void g<>();
template void g<1, 2, 3>();
}
+
+template <class... Ts>
+int var_expr(Ts... ts);
+
+template <class... Ts>
+auto a_function(Ts... ts) -> decltype(var_expr(ts...));
+
+template <class T>
+using partial = decltype(a_function<int, T>);
+
+int use_partial() { partial<char> n; }
+
+namespace PR26017 {
+template <class T>
+struct Foo {};
+template <class... Ts>
+using FooAlias = Foo<void(Ts...)>;
+
+template <class... Ts>
+using FooAliasAlias = FooAlias<Ts..., Ts...>;
+
+template <class... Ts>
+void bar(const FooAlias<Ts...> &) {}
+
+int fn() {
+ FooAlias<> a;
+ bar(a);
+
+ FooAlias<int> b;
+ bar(b);
+}
+}
OpenPOWER on IntegriCloud