diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-05-15 22:12:32 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-05-15 22:12:32 +0000 |
commit | 5831c6a1efc47e6a19d82fe3dd25b5b8fef6979d (patch) | |
tree | 8447ceca131a895505af6f77d174ed94645cc52c /lib/Sema/SemaStmt.cpp | |
parent | 987edd22710b97666b7cfc28f9a645d83d3fa201 (diff) |
Template instantiation for "for" loops
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71901 91177308-0d34-0410-b5e6-96231b3b80d8
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 |