diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-15 02:48:13 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-15 02:48:13 +0000 |
commit | 0faa2b1ae45d20c8287a329d505373ae062153ca (patch) | |
tree | 41662c41ca0bbac588448dd45c8ab1516fc0d6c4 /clang/test/Parser/objcxx11-attributes.mm | |
parent | 184e981111d74fe650b7ea4506adc9bc356273ee (diff) | |
download | bcm5719-llvm-0faa2b1ae45d20c8287a329d505373ae062153ca.tar.gz bcm5719-llvm-0faa2b1ae45d20c8287a329d505373ae062153ca.zip |
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.
llvm-svn: 172504
Diffstat (limited to 'clang/test/Parser/objcxx11-attributes.mm')
-rw-r--r-- | clang/test/Parser/objcxx11-attributes.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Parser/objcxx11-attributes.mm b/clang/test/Parser/objcxx11-attributes.mm index ad542082868..9ad85d310f9 100644 --- a/clang/test/Parser/objcxx11-attributes.mm +++ b/clang/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 ()'}} |