aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-02-28 15:07:42 +0100
committerUlf Hermann <ulf.hermann@qt.io>2017-02-28 16:33:05 +0000
commitc67d33db5b4e78027181be492d4757ac786e5c1f (patch)
tree734f00bef97f9570e1e578aaa4bf0b5f7bb30cec /src/qml/compiler
parent5a9fd4f49ec48c91c70699fc40af8f843c51b4ab (diff)
Add a source location to the final Jump in a for loop
Otherwise it will assume the last statement as the location of the jump, and that might be a statement that is never hit. Task-number: QTBUG-59204 Change-Id: I66019a284b061358939b23e649ca0832b5442388 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r--src/qml/compiler/qv4codegen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 8d0126ebb3..819f4615f2 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -2499,7 +2499,7 @@ bool Codegen::visit(LocalForStatement *ast)
_block = forbody;
statement(ast->statement);
- _block->JUMP(forstep);
+ setLocation(_block->JUMP(forstep), ast->lastSourceLocation());
_block = forstep;
statement(ast->expression);