Patch to create protocol conforming class types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42856 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Parse/ParseDecl.cpp b/Parse/ParseDecl.cpp
index 00e441412..80ff575 100644
--- a/Parse/ParseDecl.cpp
+++ b/Parse/ParseDecl.cpp
@@ -403,18 +403,20 @@
                                          TypeRep);
           if (isInvalid)
             break;
-          else { // FIXME: restrict this to "id" and ObjC classnames.
-            DS.Range.setEnd(Tok.getLocation());
-            ConsumeToken(); // The identifier
-            if (Tok.is(tok::less)) {
-              llvm::SmallVector<IdentifierInfo *, 8> ProtocolRefs;
-              ParseObjCProtocolReferences(ProtocolRefs);
-              Actions.ActOnFindProtocolDeclaration(Loc,
-                                                   &ProtocolRefs[0],
-                                                   ProtocolRefs.size());
-            }
-            continue;
+          // FIXME: restrict this to "id" and ObjC classnames.
+          DS.Range.setEnd(Tok.getLocation());
+          ConsumeToken(); // The identifier
+          if (Tok.is(tok::less)) {
+            llvm::SmallVector<IdentifierInfo *, 8> ProtocolRefs;
+            ParseObjCProtocolReferences(ProtocolRefs);
+            llvm::SmallVector<DeclTy *, 8> *ProtocolDecl = 
+                    new llvm::SmallVector<DeclTy *, 8>;
+            DS.setProtocolQualifiers(ProtocolDecl);
+            Actions.FindProtocolDeclaration(Loc, 
+                      &ProtocolRefs[0], ProtocolRefs.size(),
+                      *ProtocolDecl);
           }
+          continue;
         }
       }
       // FALL THROUGH.