improve handling of the horrible GCC objc extension that treats "<foo>"
like "id<foo>". This 1) fixes an infinite loop in the parser on things
like "short<foo>" 2) emits a warning about this bogus construct and 3)
changes the testcase to be substantially reduced.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54082 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/objc-protocol-1.m b/test/Sema/objc-protocol-1.m
new file mode 100644
index 0000000..f0615a3
--- /dev/null
+++ b/test/Sema/objc-protocol-1.m
@@ -0,0 +1,10 @@
+// RUN: clang -fsyntax-only -verify %s
+
+@protocol SomeProtocol
+@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}}
+}
+