aboutsummaryrefslogtreecommitdiff
path: root/Parse/ParseStmt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Parse/ParseStmt.cpp')
-rw-r--r--Parse/ParseStmt.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Parse/ParseStmt.cpp b/Parse/ParseStmt.cpp
index ad6f3932f6..9df20b4ade 100644
--- a/Parse/ParseStmt.cpp
+++ b/Parse/ParseStmt.cpp
@@ -235,6 +235,16 @@ Parser::StmtResult Parser::ParseIdentifierStatement(bool OnlyStatement) {
IdentTok.getLocation(), PrevSpec,
TypeRep);
assert(!isInvalid && "First declspec can't be invalid!");
+ 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(IdentTok.getLocation(),
+ &ProtocolRefs[0], ProtocolRefs.size(),
+ *ProtocolDecl);
+ }
// ParseDeclarationSpecifiers will continue from there.
ParseDeclarationSpecifiers(DS);