summaryrefslogtreecommitdiffstats
path: root/test/Parser/objcxx11-attributes.mm
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-01-15 02:48:13 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-01-15 02:48:13 +0000
commit5c52166525f8714c3e3a979b156ec23426947fd3 (patch)
treeffda5f1b208ae7962ffacd1195be22e221c3aa00 /test/Parser/objcxx11-attributes.mm
parent08e79d2f075d1326ff7a849fd1bc88dadf99d574 (diff)
Fix behavior of [[gnu::]] function attributes. Per g++'s behavior, these
attributes appertain to a declaration, even though they would be much more naturally modelled as appertaining to a function type. Previously, we would try to distribute them from the declarator to the function type, then reject them for being at an incorrect location. Now, we just distribute them as far as the declarator; the existing attribute handling code can actually apply them there just fine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/objcxx11-attributes.mm')
-rw-r--r--test/Parser/objcxx11-attributes.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/Parser/objcxx11-attributes.mm b/test/Parser/objcxx11-attributes.mm
index ad54208286..9ad85d310f 100644
--- a/test/Parser/objcxx11-attributes.mm
+++ b/test/Parser/objcxx11-attributes.mm
@@ -44,7 +44,7 @@ void f(X *noreturn) {
int e2(); // expected-warning {{interpreted as a function declaration}} expected-note{{}}
// A function taking a noreturn function.
- int(f)([[noreturn]] int()); // expected-note {{here}}
+ int(f)([[gnu::noreturn]] int ()); // expected-note {{here}}
f(e);
f(e2); // expected-error {{cannot initialize a parameter of type 'int (*)() __attribute__((noreturn))' with an lvalue of type 'int ()'}}