aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseStmt.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-10-05 15:50:46 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-10-05 15:50:46 +0000
commitbbc70c019f7b7f9a256ee29dab5287ecc82c6553 (patch)
tree09544cc551dbcfc4ac7493c6addecee646f73ef1 /lib/Parse/ParseStmt.cpp
parentca35baa788ccba7a213365b9d64d6b2f7bdb9afe (diff)
Disambiguate between a declaration or an expression, in the 'for-init-statement' part of a 'for' statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57112 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseStmt.cpp')
-rw-r--r--lib/Parse/ParseStmt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp
index 1f6eae1fc0..228bc4886c 100644
--- a/lib/Parse/ParseStmt.cpp
+++ b/lib/Parse/ParseStmt.cpp
@@ -813,7 +813,7 @@ Parser::StmtResult Parser::ParseForStatement() {
if (Tok.is(tok::semi)) { // for (;
// no first part, eat the ';'.
ConsumeToken();
- } else if (isDeclarationSpecifier()) { // for (int X = 4;
+ } else if (isSimpleDeclaration()) { // for (int X = 4;
// Parse declaration, which eats the ';'.
if (!C99orCXX) // Use of C99-style for loops in C90 mode?
Diag(Tok, diag::ext_c99_variable_decl_in_for_loop);