aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/attr-ns-bridged.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/attr-ns-bridged.m')
-rw-r--r--test/SemaObjC/attr-ns-bridged.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaObjC/attr-ns-bridged.m b/test/SemaObjC/attr-ns-bridged.m
new file mode 100644
index 000000000000..1ab60a2b0d80
--- /dev/null
+++ b/test/SemaObjC/attr-ns-bridged.m
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+typedef struct __attribute__((ns_bridged)) test0s *test0ref;
+
+void test0func(void) __attribute__((ns_bridged)); // expected-error {{'ns_bridged' attribute only applies to structs}}
+
+union __attribute__((ns_bridged)) test0u; // expected-error {{'ns_bridged' attribute only applies to structs}}
+
+struct __attribute__((ns_bridged(Test1))) test1s;
+
+@class Test2;
+struct __attribute__((ns_bridged(Test2))) test2s;
+
+void Test3(void); // expected-note {{declared here}}
+struct __attribute__((ns_bridged(Test3))) test3s; // expected-error {{parameter of 'ns_bridged' attribute does not name an Objective-C class}}