aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/expr/expr.prim/expr.prim.lambda
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2012-06-04 20:07:46 +0000
committerAaron Ballman <aaron@aaronballman.com>2012-06-04 20:07:46 +0000
commit287698336ff9f9315bf814943068d6b8261e517d (patch)
tree9ebd76040ab5a25b4f4de7f1745d58b2a28ad4c3 /test/CXX/expr/expr.prim/expr.prim.lambda
parent31170398278ff9ef08f6b6427ee596e2ca82a790 (diff)
Fixes some test cases that should have come along with r157943.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157947 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/p4.cpp8
1 files changed, 4 insertions, 4 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 d816e1702a..f580e7e4c4 100644
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp
+++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp
@@ -25,7 +25,7 @@ void infer_void_return_type(int i) {
struct X { };
X infer_X_return_type(X x) {
- return [&x](int y) { // expected-warning{{omitted result type}}
+ return [&x](int y) {
if (y > 0)
return X();
else
@@ -33,11 +33,11 @@ X infer_X_return_type(X x) {
}(5);
}
-X infer_X_return_type_fail(X x) {
- return [x](int y) { // expected-warning{{omitted result type}}
+X infer_X_return_type_fail(X x) {
+ return [x](int y) {
if (y > 0)
return X();
- else
+ else
return x; // expected-error{{return type 'const X' must match previous return type 'X' when lambda expression has unspecified explicit return type}}
}(5);
}