aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/expr/expr.prim/expr.prim.lambda
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-06-15 16:59:29 +0000
committerDouglas Gregor <dgregor@apple.com>2012-06-15 16:59:29 +0000
commit03f1eb031b84e93415b792c4b45d8da71c88e92d (patch)
tree7c8a1c559c93d606eafc678fc1e05d7b74ea9f0f /test/CXX/expr/expr.prim/expr.prim.lambda
parent111684eea03ea162897134f6371a2ea06cd3e456 (diff)
Check the parameter lists and return type of both blocks and lambdas
for unexpanded parameter packs. Fixes the crash-on-invalid in PR13117. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158525 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/expr/expr.prim/expr.prim.lambda')
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm b/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm
index 0c3fdb2d80..6a6e0d9c90 100644
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm
+++ b/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm
@@ -86,3 +86,24 @@ namespace overloading {
int &ir = accept_lambda_conv([](int x) { return x + 1; });
}
}
+
+namespace PR13117 {
+ struct A {
+ template<typename ... Args> static void f1()
+ {
+ (void)^(Args args) { // expected-error{{block contains unexpanded parameter pack 'Args'}}
+ };
+ }
+
+ template<typename ... Args> static void f2()
+ {
+ (void)[](Args args) { // expected-error{{lambda contains unexpanded parameter pack 'Args'}}
+ };
+ }
+ };
+
+ void g() {
+ A::f1<int, int>();
+ A::f2<int, int>();
+ }
+}