aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-02-09 18:40:39 +0000
committerDouglas Gregor <dgregor@apple.com>2012-02-09 18:40:39 +0000
commita0c2b21e0d84ad289781e08e14148da6b8b8b76d (patch)
tree065ea6b8a45924ca2fb279ba0c6488b054fc0aca /test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp
parent8e4bc1ec61f5895d10dba3e6212d6b505c8caca7 (diff)
Don't allow deduction of a lambda result type from an initializer
list; it is not an expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150194 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp')
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp
index a3a29c0977..cff0c09950 100644
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp
+++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp
@@ -17,6 +17,7 @@ void infer_void_return_type(int i) {
switch (x) {
case 0: return get<void>();
case 1: return;
+ case 2: return { 1, 2.0 }; // expected-error{{cannot deduce lambda return type from initializer list}}
}
}(7);
}