Fix handling of implicit int, resolving PR2012 and reverting (and
subsuming) my patch for PR1999. llvm-svn: 49251
This commit is contained in:
@@ -467,7 +467,7 @@ Parser::DeclTy *Parser::ParseFunctionDefinition(Declarator &D) {
|
||||
// If this is C90 and the declspecs were completely missing, fudge in an
|
||||
// implicit int. We do this here because this is the only place where
|
||||
// declaration-specifiers are completely optional in the grammar.
|
||||
if (getLang().isC90() && !D.getDeclSpec().getParsedSpecifiers() == 0) {
|
||||
if (getLang().ImplicitInt && D.getDeclSpec().getParsedSpecifiers() == 0) {
|
||||
const char *PrevSpec;
|
||||
D.getDeclSpec().SetTypeSpecType(DeclSpec::TST_int, D.getIdentifierLoc(),
|
||||
PrevSpec);
|
||||
|
||||
Reference in New Issue
Block a user