summaryrefslogtreecommitdiff
path: root/test/Parser/objcxx11-attributes.mm
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-05-03 16:53:59 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-05-03 16:53:59 +0000
commit6b9a6e390fbb92c40eb9c6ac9e7abbd88dd7a767 (patch)
tree2e51705e103e92c7be1b21e8bd8ffd5b5d0e4d52 /test/Parser/objcxx11-attributes.mm
parentdbe13110f59f48b4dbb7552b3ac2935acdeece7f (diff)
Diffstat (limited to 'test/Parser/objcxx11-attributes.mm')
-rw-r--r--test/Parser/objcxx11-attributes.mm8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/Parser/objcxx11-attributes.mm b/test/Parser/objcxx11-attributes.mm
index 0875b66e2132e..0c91392978af4 100644
--- a/test/Parser/objcxx11-attributes.mm
+++ b/test/Parser/objcxx11-attributes.mm
@@ -31,15 +31,17 @@ void f(X *noreturn) {
// An attribute is OK.
[[]];
- [[int(), noreturn]];
+ [[int(), noreturn]]; // expected-warning {{attribute noreturn cannot be specified on a statement}}
[[class, test(foo 'x' bar),,,]];
- [[bitand, noreturn]];
+ [[bitand, noreturn]]; // expected-warning {{attribute noreturn cannot be specified on a statement}}
[[noreturn]]int(e)();
+ int e2(); // expected-warning {{interpreted as a function declaration}} expected-note{{}}
// A function taking a noreturn function.
- int(f)([[noreturn]] int());
+ int(f)([[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 ()'}}
// Variables initialized by a message send.
int(g)([[noreturn getSelf] getSize]);