diff options
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 8226dd23f9..2e5baee72d 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -589,7 +589,7 @@ Sema::ActOnForStmt(SourceLocation ForLoc, SourceLocation LParenLoc, } } } - if (Second) { + if (Second && !Second->isTypeDependent()) { DefaultFunctionArrayConversion(Second); QualType SecondType = Second->getType(); @@ -605,7 +605,8 @@ Sema::ActOnForStmt(SourceLocation ForLoc, SourceLocation LParenLoc, second.release(); third.release(); body.release(); - return Owned(new (Context) ForStmt(First, Second, Third, Body, ForLoc)); + return Owned(new (Context) ForStmt(First, Second, Third, Body, ForLoc, + LParenLoc, RParenLoc)); } Action::OwningStmtResult |