diff options
Diffstat (limited to 'test/Parser/objcxx11-attributes.mm')
-rw-r--r-- | test/Parser/objcxx11-attributes.mm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/Parser/objcxx11-attributes.mm b/test/Parser/objcxx11-attributes.mm index ad54208..c1d8c41 100644 --- a/test/Parser/objcxx11-attributes.mm +++ b/test/Parser/objcxx11-attributes.mm @@ -13,12 +13,12 @@ void f(X *noreturn) { int a[ [noreturn getSize] ]; // ... but is interpreted as an attribute where possible. - int b[ [noreturn] ]; // expected-warning {{'noreturn' only applies to function types}} + int b[ [noreturn] ]; // expected-error {{'noreturn' attribute only applies to functions and methods}} int c[ [noreturn getSize] + 1 ]; // An array size which is computed by a lambda is not OK. - int d[ [noreturn] { return 3; } () ]; // expected-error {{expected ']'}} expected-warning {{'noreturn' only applies}} + int d[ [noreturn] { return 3; } () ]; // expected-error {{expected ']'}} expected-error {{'noreturn' attribute only applies}} // A message send which contains a message send is OK. [ [ X alloc ] init ]; @@ -32,19 +32,19 @@ void f(X *noreturn) { // An attribute is OK. [[]]; [[int(), noreturn]]; // expected-warning {{unknown attribute 'int' ignored}} \ - // expected-warning {{attribute noreturn cannot be specified on a statement}} + // expected-error {{'noreturn' attribute cannot be applied to a statement}} [[class, test(foo 'x' bar),,,]]; // expected-warning {{unknown attribute 'test' ignored}}\ // expected-warning {{unknown attribute 'class' ignored}} - [[bitand, noreturn]]; // expected-warning {{attribute noreturn cannot be specified on a statement}} \ + [[bitand, noreturn]]; // expected-error {{'noreturn' attribute cannot be applied to a statement}} \ expected-warning {{unknown attribute 'bitand' ignored}} // FIXME: Suppress vexing parse warning - [[noreturn]]int(e)(); // expected-warning {{function declaration}} expected-note {{replace parentheses with an initializer}} + [[gnu::noreturn]]int(e)(); // expected-warning {{function declaration}} expected-note {{replace parentheses with an initializer}} 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 ()'}} |