Fix the recovery from missing semis on @property declarations to not consume

the following '@'.  Conceivably, we could skip tokens until something that
can validly start an @interface declaration here, but it's not clear that
it matters.

llvm-svn: 128325
This commit is contained in:
John McCall 2011-03-26 01:53:26 +00:00
parent 9db0212bc7
commit 405988b97c
2 changed files with 6 additions and 2 deletions

View File

@ -442,8 +442,7 @@ void Parser::ParseObjCInterfaceDeclList(Decl *interfaceDecl,
DeclSpec DS(AttrFactory);
ParseStructDeclaration(DS, Callback);
ExpectAndConsume(tok::semi, diag::err_expected_semi_decl_list, "",
tok::at);
ExpectAndConsume(tok::semi, diag::err_expected_semi_decl_list);
break;
}
}

View File

@ -0,0 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -fblocks %s
@interface Test0
@property (assign) id x // expected-error {{expected ';' at end of declaration list}}
@end