Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions clang/lib/Parse/ParseDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5849,15 +5849,8 @@ void Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl,

// The next token must be valid after an enum definition. If not, a ';'
// was probably forgotten.
bool CanBeBitfield = getCurScope()->isClassScope();
if (!isValidAfterTypeSpecifier(CanBeBitfield)) {
ExpectAndConsume(tok::semi, diag::err_expected_after, "enum");
// Push this token back into the preprocessor and change our current token
// to ';' so that the rest of the code recovers as though there were an
// ';' after the definition.
PP.EnterToken(Tok, /*IsReinject=*/true);
Tok.setKind(tok::semi);
}
bool CanBeBitfield=getCurScope( )-> isClassScope( );if(!isValidAfterTypeSpecifier(CanBeBitfield)){ExpectAndConsume(tok::semi,diag::err_expected_after,"enum");PP.EnterToken(Tok,true);Tok.setKind(tok::semi);}

}

/// isKnownToBeTypeSpecifier - Return true if we know that the specified token
Expand Down