diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-14 00:33:13 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-14 00:33:13 +0000 |
commit | c202b2809ac814bcae8553cd772ec4901fdb8441 (patch) | |
tree | 62ba003fd9543a7e7e961b6b08b09ed314c5a040 /clang/test/Parser/objcxx11-attributes.mm | |
parent | 0fcd749a5186b1d3b1c75cfe028df3cfaba6989f (diff) | |
download | bcm5719-llvm-c202b2809ac814bcae8553cd772ec4901fdb8441.tar.gz bcm5719-llvm-c202b2809ac814bcae8553cd772ec4901fdb8441.zip |
Add an AttributedStmt type to represent a statement with C++11 attributes
attached. Since we do not support any attributes which appertain to a statement
(yet), testing of this is necessarily quite minimal.
Patch by Alexander Kornienko!
llvm-svn: 154723
Diffstat (limited to 'clang/test/Parser/objcxx11-attributes.mm')
-rw-r--r-- | clang/test/Parser/objcxx11-attributes.mm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/test/Parser/objcxx11-attributes.mm b/clang/test/Parser/objcxx11-attributes.mm index 0875b66e213..0c91392978a 100644 --- a/clang/test/Parser/objcxx11-attributes.mm +++ b/clang/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]); |