summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Sema/attr-availability-macosx.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Sema/attr-availability-macosx.c b/clang/test/Sema/attr-availability-macosx.c
index 21a79ff17a1..6991f14d950 100644
--- a/clang/test/Sema/attr-availability-macosx.c
+++ b/clang/test/Sema/attr-availability-macosx.c
@@ -45,3 +45,14 @@ enum {
enum __attribute__((availability(macosx,introduced=8.0,deprecated=9.0))) {
bar1 = foo
};
+
+// Make sure the note is on the declaration with the actual availability attributes.
+struct __attribute__((availability(macosx,strict,introduced=10.9))) type_info // \
+ expected-note{{'type_info' has been explicitly marked unavailable here}}
+{
+};
+struct type_info;
+int test2() {
+ struct type_info *t; // expected-error{{'type_info' is unavailable: introduced in OS X 10.9}}
+ return 0;
+}
OpenPOWER on IntegriCloud