diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-17 01:30:42 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-17 01:30:42 +0000 |
commit | cd8ab51a44e80625d84126780b0d85a7732e25af (patch) | |
tree | eb8a9f189b8553a98c361192ddb816b8f1703d5c /test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp | |
parent | 6c3af3d0e3e65bcbca57bfd458d684941f6d0531 (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/templates.cpp')
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp index 49b9c66b1c..407b083231 100644 --- a/test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp +++ b/test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp @@ -2,10 +2,11 @@ template<typename T> void test_attributes() { - auto nrl = []() [[noreturn]] {}; // expected-error{{lambda declared 'noreturn' should not return}} + // FIXME: GCC accepts [[gnu::noreturn]] here. + auto nrl = []() [[gnu::noreturn]] {}; // expected-warning{{attribute 'noreturn' ignored}} } -template void test_attributes<int>(); // expected-note{{in instantiation of function}} +template void test_attributes<int>(); template<typename T> void call_with_zero() { |