summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx0x-lambda-expressions.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-11 20:32:35 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-11 20:32:35 +0000
commit7e1fd018a8c1a9e192616195419f41787c41249b (patch)
treebdf3f5b2da3662703c3af5c6cc8e9e6bb4b3790d /clang/test/Parser/cxx0x-lambda-expressions.cpp
parent9f74f15682c0c6f7cf5afc34c838d3df8d96618c (diff)
downloadbcm5719-llvm-7e1fd018a8c1a9e192616195419f41787c41249b.tar.gz
bcm5719-llvm-7e1fd018a8c1a9e192616195419f41787c41249b.zip
Improving test coverage for lambda expressions with attribute specifiers.
llvm-svn: 203602
Diffstat (limited to 'clang/test/Parser/cxx0x-lambda-expressions.cpp')
-rw-r--r--clang/test/Parser/cxx0x-lambda-expressions.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/clang/test/Parser/cxx0x-lambda-expressions.cpp b/clang/test/Parser/cxx0x-lambda-expressions.cpp
index 6d39a730478..e4151dc8888 100644
--- a/clang/test/Parser/cxx0x-lambda-expressions.cpp
+++ b/clang/test/Parser/cxx0x-lambda-expressions.cpp
@@ -24,7 +24,6 @@ class C {
[] () -> class C { return C(); };
[] () -> enum E { return e; };
- [] [[fake_ident]] { while (1) ; }; // expected-error {{lambda requires '()' before attribute specifier}} expected-warning {{unknown attribute 'fake_ident' ignored}}
[] -> 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}}
@@ -65,4 +64,16 @@ class C {
return x + 2;
} ();
}
+
+ void attributes() {
+ [] [[]] {}; // expected-error {{lambda requires '()' before attribute specifier}}
+ []() [[]]
+ mutable {}; // expected-error {{expected body of lambda expression}}
+
+ []() [[]] {};
+ []() [[]] -> void {};
+ []() mutable [[]] -> void {};
+ []() mutable noexcept [[]] -> void {};
+
+}
};
OpenPOWER on IntegriCloud