aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-05 06:32:51 +0000
committerChris Lattner <sabre@nondot.org>2008-04-05 06:32:51 +0000
commitd658b562e80d6ef7a1118e34ff12802c6e2fcced (patch)
tree702deb2a68acdb5c9cc32f9a39e1982b829c3764 /lib/Parse/Parser.cpp
parenta798ebc82627ea9cb7a00da07d2b60f9f2114f69 (diff)
Fix handling of implicit int, resolving PR2012 and reverting (and
subsuming) my patch for PR1999. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49251 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r--lib/Parse/Parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index 76091245b5..cd99fc04eb 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -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);