summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2016-05-06 21:04:01 +0000
committerManman Ren <manman.ren@gmail.com>2016-05-06 21:04:01 +0000
commit719a864147e0fe6beb145424c8e9958a9ceb23d9 (patch)
treedb8aa5ddc61c0cd0bfbca1c110ae8544f436c50d /clang/test/Sema
parent2b37017c38a4af183b4435bbec20c12b22537d26 (diff)
downloadbcm5719-llvm-719a864147e0fe6beb145424c8e9958a9ceb23d9.tar.gz
bcm5719-llvm-719a864147e0fe6beb145424c8e9958a9ceb23d9.zip
Availability: set location when creating attribute for tvos, watchos.
When inferring availability attributes for tvos, watchos from ios, we use the same source location and set the implicit bit to true. So when emitting diagnostics on inferred attributes, we have a source location. rdar://25893544 llvm-svn: 268793
Diffstat (limited to 'clang/test/Sema')
-rw-r--r--clang/test/Sema/attr-availability-tvos.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Sema/attr-availability-tvos.c b/clang/test/Sema/attr-availability-tvos.c
index b60fdb0d19c..642246425b3 100644
--- a/clang/test/Sema/attr-availability-tvos.c
+++ b/clang/test/Sema/attr-availability-tvos.c
@@ -27,6 +27,12 @@ void test_transcribed_availability() {
f9(0);
}
+__attribute__((availability(ios,introduced=9_0,deprecated=9_0,message="" ))) // expected-note{{previous attribute is here}} \
+ // expected-note{{previous attribute is here}}
+__attribute__((availability(ios,introduced=7_0))) // expected-warning{{availability does not match previous declaration}} \
+ // expected-warning{{availability does not match previous declaration}}
+void f10(int);
+
// Test tvOS specific attributes.
void f0_tvos(int) __attribute__((availability(tvos,introduced=2.0,deprecated=2.1))); // expected-note {{'f0_tvos' has been explicitly marked deprecated here}}
void f1_tvos(int) __attribute__((availability(tvos,introduced=2.1)));
OpenPOWER on IntegriCloud