summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx0x-attributes.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-31 17:32:39 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-31 17:32:39 +0000
commitb8e203939e19618ebf73ee5c85901914e3060af1 (patch)
treef80ac9cdcfd1690f51ac4254e6616495ebb8d23b /clang/test/Parser/cxx0x-attributes.cpp
parent4b293ebbaa96e75ea5f819e82be284d59ce436ad (diff)
downloadbcm5719-llvm-b8e203939e19618ebf73ee5c85901914e3060af1.tar.gz
bcm5719-llvm-b8e203939e19618ebf73ee5c85901914e3060af1.zip
Introduced an attribute syntax-neutral method for parsing attribute arguments that is currently being used by GNU and C++-style attributes. This allows C++11 attributes with argument lists to be handled properly, fixing the "deprecated", "type_visibility", and capability-related attributes with arguments.
llvm-svn: 205226
Diffstat (limited to 'clang/test/Parser/cxx0x-attributes.cpp')
-rw-r--r--clang/test/Parser/cxx0x-attributes.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/clang/test/Parser/cxx0x-attributes.cpp b/clang/test/Parser/cxx0x-attributes.cpp
index 5d3b8250691..1b9e477004a 100644
--- a/clang/test/Parser/cxx0x-attributes.cpp
+++ b/clang/test/Parser/cxx0x-attributes.cpp
@@ -48,13 +48,13 @@ int array_attr [1] [[]];
alignas(8) int aligned_attr;
[[test::valid(for 42 [very] **** '+' symbols went on a trip and had a "good"_time; the end.)]] int garbage_attr; // expected-warning {{unknown attribute 'valid' ignored}}
[[,,,static, class, namespace,, inline, constexpr, mutable,, bitand, bitor::compl(!.*_ Cx.!U^*R),,,]] int more_garbage_attr; // expected-warning {{unknown attribute 'static' ignored}} \
- // expected-warning {{unknown attribute 'class' ignored}} \
- // expected-warning {{unknown attribute 'namespace' ignored}} \
- // expected-warning {{unknown attribute 'inline' ignored}} \
- // expected-warning {{unknown attribute 'constexpr' ignored}} \
- // expected-warning {{unknown attribute 'mutable' ignored}} \
- // expected-warning {{unknown attribute 'bitand' ignored}} \
- // expected-warning {{unknown attribute 'compl' ignored}}
+ // expected-warning {{unknown attribute 'class' ignored}} \
+ // expected-warning {{unknown attribute 'namespace' ignored}} \
+ // expected-warning {{unknown attribute 'inline' ignored}} \
+ // expected-warning {{unknown attribute 'constexpr' ignored}} \
+ // expected-warning {{unknown attribute 'mutable' ignored}} \
+ // expected-warning {{unknown attribute 'bitand' ignored}} \
+ // expected-warning {{unknown attribute 'compl' ignored}}
[[u8"invalid!"]] int invalid_string_attr; // expected-error {{expected ']'}}
void fn_attr () [[]];
void noexcept_fn_attr () noexcept [[]];
@@ -281,7 +281,8 @@ enum class [[]] EvenMoreSecrets {};
namespace arguments {
void f[[gnu::format(printf, 1, 2)]](const char*, ...);
- void g() [[unknown::foo(arguments of attributes from unknown namespace other than 'gnu' namespace are ignored... blah...)]]; // expected-warning {{unknown attribute 'foo' ignored}}
+ void g() [[unknown::foo(ignore arguments for unknown attributes, even with symbols!)]]; // expected-warning {{unknown attribute 'foo' ignored}}
+ [[deprecated("with argument")]] int i;
}
// Forbid attributes on decl specifiers.
OpenPOWER on IntegriCloud