Commit 1aa4b61c by Veranika Liaukevich

Local variables hide function arguments

Definitions of variables inside functions should be located in a scope different from function's arguments scope. Change-Id: I89fe1f527681c68963f4a69c71b78975787a410c Reviewed-on: https://swiftshader-review.googlesource.com/4180Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarVeranika Liaukevich <veranika@google.com>
parent eced26a1
...@@ -1718,7 +1718,7 @@ function_definition ...@@ -1718,7 +1718,7 @@ function_definition
$1.intermAggregate = paramNodes; $1.intermAggregate = paramNodes;
context->setLoopNestingLevel(0); context->setLoopNestingLevel(0);
} }
compound_statement_no_new_scope { compound_statement {
//?? Check that all paths return a value if return type != void ? //?? Check that all paths return a value if return type != void ?
// May be best done as post process phase on intermediate code // May be best done as post process phase on intermediate code
if (context->getCurrentFunctionType()->getBasicType() != EbtVoid && ! context->getFunctionReturnsValue()) { if (context->getCurrentFunctionType()->getBasicType() != EbtVoid && ! context->getFunctionReturnsValue()) {
......
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