forked from OSchip/llvm-project
simplify some code by using ExpectAndConsume. When an error
occurs, skip to an @ or ; instead of to a } or ;. Properties don't necessarily live in {}'s. llvm-svn: 57804
This commit is contained in:
parent
da9fb15b90
commit
e0d3fe9b97
|
@ -310,12 +310,9 @@ void Parser::ParseObjCInterfaceDeclList(DeclTy *interfaceDecl,
|
|||
llvm::SmallVector<FieldDeclarator, 8> FieldDeclarators;
|
||||
ParseStructDeclaration(DS, FieldDeclarators);
|
||||
|
||||
if (Tok.is(tok::semi))
|
||||
ConsumeToken();
|
||||
else {
|
||||
Diag(Tok, diag::err_expected_semi_decl_list);
|
||||
SkipUntil(tok::r_brace, true, true);
|
||||
}
|
||||
ExpectAndConsume(tok::semi, diag::err_expected_semi_decl_list, "",
|
||||
tok::at);
|
||||
|
||||
// Convert them all to property declarations.
|
||||
for (unsigned i = 0, e = FieldDeclarators.size(); i != e; ++i) {
|
||||
FieldDeclarator &FD = FieldDeclarators[i];
|
||||
|
|
Loading…
Reference in New Issue