summaryrefslogtreecommitdiffstats
path: root/test/Parser/cxx0x-lambda-expressions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/cxx0x-lambda-expressions.cpp')
-rw-r--r--test/Parser/cxx0x-lambda-expressions.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Parser/cxx0x-lambda-expressions.cpp b/test/Parser/cxx0x-lambda-expressions.cpp
index 7e9d475..642c69a 100644
--- a/test/Parser/cxx0x-lambda-expressions.cpp
+++ b/test/Parser/cxx0x-lambda-expressions.cpp
@@ -26,6 +26,7 @@ class C {
[] -> int { return 0; }; // expected-error{{lambda requires '()' before return type}}
[] mutable -> int { return 0; }; // expected-error{{lambda requires '()' before 'mutable'}}
+ [](int) -> {}; // PR13652 expected-error {{expected a type}}
return 1;
}
@@ -33,7 +34,7 @@ class C {
typedef int T;
const int b = 0;
const int c = 1;
- int a1[1] = {[b] (T()) {}}; // expected-error{{no viable conversion from 'C::<lambda}}
+ int a1[1] = {[b] (T()) {}}; // expected-error{{no viable conversion from '<lambda}}
int a2[1] = {[b] = 1 };
int a3[1] = {[b,c] = 1 }; // expected-error{{expected body of lambda expression}}
int a4[1] = {[&b] = 1 }; // expected-error{{integral constant expression must have integral or unscoped enumeration type, not 'const int *'}}
OpenPOWER on IntegriCloud