fix several problems with the protocol qualified id handling where id was implicit.

First, fix canonical type handling of these, since protocol qualified id's are always
canonical.  Next, enhance SemaType to actually make these when used (instead of int)
allowing them to actually be used when appropriate.  Finally remove a bunch of logic
relating to the mishandling of canonical types with protocol-qual id's.  This fixes
rdar://5986251


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54083 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/objc-protocol-1.m b/test/Sema/objc-protocol-1.m
index f0615a3..3ace0ac 100644
--- a/test/Sema/objc-protocol-1.m
+++ b/test/Sema/objc-protocol-1.m
@@ -1,10 +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}}
 }