aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-01-17 01:30:42 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-01-17 01:30:42 +0000
commitcd8ab51a44e80625d84126780b0d85a7732e25af (patch)
treeeb8a9f189b8553a98c361192ddb816b8f1703d5c /test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp
parent6c3af3d0e3e65bcbca57bfd458d684941f6d0531 (diff)
Implement C++11 semantics for [[noreturn]] attribute. This required splitting
it apart from [[gnu::noreturn]] / __attribute__((noreturn)), since their semantics are not equivalent (for instance, we treat [[gnu::noreturn]] as affecting the function type, whereas [[noreturn]] does not). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172691 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp')
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp
index 68460f0354..9dffc1ff26 100644
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp
+++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp
@@ -5,7 +5,8 @@
void test_attributes() {
auto nrl = [](int x) -> int { if (x > 0) return x; }; // expected-warning{{control may reach end of non-void lambda}}
- auto nrl2 = []() [[noreturn]] { return; }; // expected-error{{lambda declared 'noreturn' should not return}}
+ // FIXME: GCC accepts the [[gnu::noreturn]] attribute here.
+ auto nrl2 = []() [[gnu::noreturn]] { return; }; // expected-warning{{attribute 'noreturn' ignored}}
}
template<typename T>