summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/objc-protocol-1.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaObjC/objc-protocol-1.m')
-rw-r--r--clang/test/SemaObjC/objc-protocol-1.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/objc-protocol-1.m b/clang/test/SemaObjC/objc-protocol-1.m
new file mode 100644
index 00000000000..3ace0ac3de0
--- /dev/null
+++ b/clang/test/SemaObjC/objc-protocol-1.m
@@ -0,0 +1,14 @@
+// RUN: clang -fsyntax-only -verify %s
+// rdar://5986251
+
+@protocol SomeProtocol
+- (void) bar;
+@end
+
+void foo(id x) {
+ bar((short<SomeProtocol>)x); // expected-error {{expected ')'}} expected-error {{to match this '('}}
+ bar((<SomeProtocol>)x); // expected-warning {{protocol qualifiers without 'id' is archaic}}
+
+ [(<SomeProtocol>)x bar]; // expected-warning {{protocol qualifiers without 'id' is archaic}}
+}
+
OpenPOWER on IntegriCloud