aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Parse/ParseObjc.cpp3
-rw-r--r--test/Parser/enhanced-proto-1.m17
2 files changed, 20 insertions, 0 deletions
diff --git a/Parse/ParseObjc.cpp b/Parse/ParseObjc.cpp
index 88be2dc5fb..05cbabd67c 100644
--- a/Parse/ParseObjc.cpp
+++ b/Parse/ParseObjc.cpp
@@ -264,6 +264,9 @@ void Parser::ParseObjCInterfaceDeclList(DeclTy *interfaceDecl,
ExpectAndConsume(tok::semi, diag::err_expected_semi_after,"method proto");
continue;
}
+ else if (Tok.is(tok::at))
+ continue;
+
if (Tok.is(tok::semi))
ConsumeToken();
else if (Tok.is(tok::eof))
diff --git a/test/Parser/enhanced-proto-1.m b/test/Parser/enhanced-proto-1.m
new file mode 100644
index 0000000000..354502e791
--- /dev/null
+++ b/test/Parser/enhanced-proto-1.m
@@ -0,0 +1,17 @@
+// RUN: clang -fsyntax-only -verify %s
+
+@protocol MyProto1
+@optional
+- (void) FOO;
+@optional
+- (void) FOO;
+@required
+- (void) REQ;
+@optional
+@end
+
+@protocol MyProto2 <MyProto1>
+- (void) FOO2;
+@optional
+- (void) FOO3;
+@end