forked from OSchip/llvm-project
Improve error recovery when parsing a function definition fails
llvm-svn: 60380
This commit is contained in:
parent
b690cbb928
commit
da747baa3c
|
@ -415,7 +415,7 @@ Parser::DeclTy *Parser::ParseDeclarationOrFunctionDefinition() {
|
|||
// Error parsing the declarator?
|
||||
if (!DeclaratorInfo.hasName()) {
|
||||
// If so, skip until the semi-colon or a }.
|
||||
SkipUntil(tok::r_brace, true);
|
||||
SkipUntil(tok::r_brace, true, true);
|
||||
if (Tok.is(tok::semi))
|
||||
ConsumeToken();
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue