Commit 690057da by Olli Etuaho Committed by Commit Bot

Remove incorrect cast of loop condition in GLSL parsing

Loop condition node may be a declaration node when coming from the parser, so it shouldn't be casted to TIntermTyped*. BUG=chromium:738281 TEST=angle_unittests under CFI Change-Id: Ie98befc4b02b1261949049ddff49404d73db8478 Reviewed-on: https://chromium-review.googlesource.com/558083Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
parent 69056a1e
...@@ -1347,7 +1347,7 @@ iteration_statement ...@@ -1347,7 +1347,7 @@ iteration_statement
} }
| FOR LEFT_PAREN { context->symbolTable.push(); context->incrLoopNestingLevel(); } for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope { | FOR LEFT_PAREN { context->symbolTable.push(); context->incrLoopNestingLevel(); } for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope {
context->symbolTable.pop(); context->symbolTable.pop();
$$ = context->addLoop(ELoopFor, $4, reinterpret_cast<TIntermTyped*>($5.node1), reinterpret_cast<TIntermTyped*>($5.node2), $7, @1); $$ = context->addLoop(ELoopFor, $4, $5.node1, reinterpret_cast<TIntermTyped*>($5.node2), $7, @1);
context->decrLoopNestingLevel(); context->decrLoopNestingLevel();
} }
; ;
......
...@@ -4771,7 +4771,7 @@ yyreduce: ...@@ -4771,7 +4771,7 @@ yyreduce:
{ {
context->symbolTable.pop(); context->symbolTable.pop();
(yyval.interm.intermNode) = context->addLoop(ELoopFor, (yyvsp[-3].interm.intermNode), reinterpret_cast<TIntermTyped*>((yyvsp[-2].interm.nodePair).node1), reinterpret_cast<TIntermTyped*>((yyvsp[-2].interm.nodePair).node2), (yyvsp[0].interm.intermNode), (yylsp[-6])); (yyval.interm.intermNode) = context->addLoop(ELoopFor, (yyvsp[-3].interm.intermNode), (yyvsp[-2].interm.nodePair).node1, reinterpret_cast<TIntermTyped*>((yyvsp[-2].interm.nodePair).node2), (yyvsp[0].interm.intermNode), (yylsp[-6]));
context->decrLoopNestingLevel(); context->decrLoopNestingLevel();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment