summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2013-07-18 13:13:52 +0000
committerAaron Ballman <aaron@aaronballman.com>2013-07-18 13:13:52 +0000
commit8b8ebdd9dd12530f6edf73a7ce1b02e8b0338aa1 (patch)
tree7362d4a417d0f957fed2fba48602684783d67203 /clang/test
parent79d79da0e1f635d9d76ae253c4f12d24eda82657 (diff)
downloadbcm5719-llvm-8b8ebdd9dd12530f6edf73a7ce1b02e8b0338aa1.tar.gz
bcm5719-llvm-8b8ebdd9dd12530f6edf73a7ce1b02e8b0338aa1.zip
Removed a parameter from handleAttrWithMessage to make it more consistent with other attribute handlers, as well as other attribute error messages. Added missing test cases for the unavailable attribute, and updated the deprecated test case.
llvm-svn: 186578
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Sema/MicrosoftExtensions.c2
-rw-r--r--clang/test/Sema/attr-unavailable-message.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/Sema/MicrosoftExtensions.c b/clang/test/Sema/MicrosoftExtensions.c
index 5215e72b1ba..6bafc364828 100644
--- a/clang/test/Sema/MicrosoftExtensions.c
+++ b/clang/test/Sema/MicrosoftExtensions.c
@@ -96,7 +96,7 @@ struct __declspec(deprecated) DS1 { int i; float f; }; // expected-note {{declar
#define MY_TEXT "This is also deprecated"
__declspec(deprecated(MY_TEXT)) void Dfunc1( void ) {} // expected-note {{'Dfunc1' declared here}}
-struct __declspec(deprecated(123)) DS2 {}; // expected-error {{argument to deprecated attribute was not a string literal}}
+struct __declspec(deprecated(123)) DS2 {}; // expected-error {{argument to 'deprecated' attribute was not a string literal}}
void test( void ) {
e1 = one; // expected-warning {{'e1' is deprecated: This is deprecated}}
diff --git a/clang/test/Sema/attr-unavailable-message.c b/clang/test/Sema/attr-unavailable-message.c
index 97104960e5e..1e1e19e60b7 100644
--- a/clang/test/Sema/attr-unavailable-message.c
+++ b/clang/test/Sema/attr-unavailable-message.c
@@ -6,6 +6,11 @@ double dfoo(double) __attribute__((__unavailable__("NO LONGER"))); // expected-
void bar() __attribute__((__unavailable__)); // expected-note {{explicitly marked unavailable}}
+int quux(void) __attribute__((__unavailable__(12))); // expected-error {{argument to '__unavailable__' attribute was not a string literal}}
+
+#define ACCEPTABLE "Use something else"
+int quux2(void) __attribute__((__unavailable__(ACCEPTABLE)));
+
void test_foo() {
int ir = foo(1); // expected-error {{'foo' is unavailable: USE IFOO INSTEAD}}
double dr = dfoo(1.0); // expected-error {{'dfoo' is unavailable: NO LONGER}}
OpenPOWER on IntegriCloud