diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-10-05 15:50:46 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-10-05 15:50:46 +0000 |
commit | bc28fefcdeac85bfc74394e6b1f8fbeebff1dad5 (patch) | |
tree | 64d1f29050dfa13edb9d323f30b15ec94df5fe6a /clang/lib/Parse/ParseStmt.cpp | |
parent | 2534620b4ec80cfccfe06fe63df9ea355b6d638c (diff) | |
download | bcm5719-llvm-bc28fefcdeac85bfc74394e6b1f8fbeebff1dad5.tar.gz bcm5719-llvm-bc28fefcdeac85bfc74394e6b1f8fbeebff1dad5.zip |
Disambiguate between a declaration or an expression, in the 'for-init-statement' part of a 'for' statement.
llvm-svn: 57112
Diffstat (limited to 'clang/lib/Parse/ParseStmt.cpp')
-rw-r--r-- | clang/lib/Parse/ParseStmt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp index 1f6eae1fc06..228bc4886ca 100644 --- a/clang/lib/Parse/ParseStmt.cpp +++ b/clang/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); |