Improve error recovery when parsing a function definition fails

llvm-svn: 60380
This commit is contained in:
Douglas Gregor 2008-12-01 23:03:32 +00:00
parent b690cbb928
commit da747baa3c
1 changed files with 1 additions and 1 deletions

View File

@ -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;