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
diff --git a/test/Parser/cxx0x-attributes.cpp b/test/Parser/cxx0x-attributes.cpp
index dac159a..ab6aa70 100644
--- a/test/Parser/cxx0x-attributes.cpp
+++ b/test/Parser/cxx0x-attributes.cpp
@@ -210,8 +210,11 @@
 
 // Expression tests
 void bar () {
-  [] () [[noreturn]] { return; } (); // expected-error {{should not return}}
-  [] () [[noreturn]] { throw; } ();
+  // FIXME: GCC accepts [[gnu::noreturn]] on a lambda, even though it appertains
+  // to the operator()'s type, and GCC does not otherwise accept attributes
+  // applied to types. Use that to test this.
+  [] () [[gnu::noreturn]] { return; } (); // expected-warning {{attribute 'noreturn' ignored}} FIXME-error {{should not return}}
+  [] () [[gnu::noreturn]] { throw; } (); // expected-warning {{attribute 'noreturn' ignored}}
   new int[42][[]][5][[]]{};
 }