diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-02-09 08:26:42 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-02-09 08:26:42 +0000 |
commit | b326ca8ffbea96f9cc8a457b0f57be880304a6f5 (patch) | |
tree | 88d0757c9105ab4be5c68f44046cab11caa0ffd8 /test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp | |
parent | 7e545d95bc92157f9f124d95aa2ed66d691d2028 (diff) |
Remove the "unsupported" error for lambda expressions. It's annoying,
and rapidly becoming untrue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150165 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp')
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp index e816426cbf..21c8e22092 100644 --- a/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp +++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp @@ -2,8 +2,7 @@ // Check that analysis-based warnings work in lambda bodies. void analysis_based_warnings() { - (void)[]() -> int { }; // expected-warning{{control reaches end of non-void function}} \ - // expected-error{{lambda expressions are not supported yet}} + (void)[]() -> int { }; // expected-warning{{control reaches end of non-void function}} } // Check that we get the right types of captured variables (the @@ -12,32 +11,32 @@ int &check_const_int(int&); float &check_const_int(const int&); void test_capture_constness(int i, const int ic) { - (void)[i,ic] ()->void { // expected-error{{lambda expressions are not supported yet}} + (void)[i,ic] ()->void { float &fr1 = check_const_int(i); float &fr2 = check_const_int(ic); }; - (void)[=] ()->void { // expected-error{{lambda expressions are not supported yet}} + (void)[=] ()->void { float &fr1 = check_const_int(i); float &fr2 = check_const_int(ic); }; - (void)[i,ic] () mutable ->void { // expected-error{{lambda expressions are not supported yet}} + (void)[i,ic] () mutable ->void { int &ir = check_const_int(i); float &fr = check_const_int(ic); }; - (void)[=] () mutable ->void { // expected-error{{lambda expressions are not supported yet}} + (void)[=] () mutable ->void { int &ir = check_const_int(i); float &fr = check_const_int(ic); }; - (void)[&i,&ic] ()->void { // expected-error{{lambda expressions are not supported yet}} + (void)[&i,&ic] ()->void { int &ir = check_const_int(i); float &fr = check_const_int(ic); }; - (void)[&] ()->void { // expected-error{{lambda expressions are not supported yet}} + (void)[&] ()->void { int &ir = check_const_int(i); float &fr = check_const_int(ic); }; |