summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Parser/attributes.c3
-rw-r--r--clang/test/Parser/cxx0x-attributes.cpp7
2 files changed, 8 insertions, 2 deletions
diff --git a/clang/test/Parser/attributes.c b/clang/test/Parser/attributes.c
index 8d7e5fe503a..3d69c72c322 100644
--- a/clang/test/Parser/attributes.c
+++ b/clang/test/Parser/attributes.c
@@ -94,5 +94,4 @@ void testFundef5() __attribute__(()) { }
__attribute__((pure)) int testFundef6(int a) { return a; }
-
-
+void deprecatedTestFun(void) __attribute__((deprecated()));
diff --git a/clang/test/Parser/cxx0x-attributes.cpp b/clang/test/Parser/cxx0x-attributes.cpp
index 1b9e477004a..777a40a4e8a 100644
--- a/clang/test/Parser/cxx0x-attributes.cpp
+++ b/clang/test/Parser/cxx0x-attributes.cpp
@@ -322,3 +322,10 @@ namespace GccASan {
[[gnu::no_address_safety_analysis]] void f3();
[[gnu::no_sanitize_address]] void f4();
}
+
+namespace {
+ [[deprecated]] void bar();
+ [[deprecated("hello")]] void baz();
+ [[deprecated()]] void foo(); // expected-error {{attribute 'deprecated' requires a nonempty argument list}}
+ [[gnu::deprecated()]] void quux();
+}
OpenPOWER on IntegriCloud