scan.cc: clear_assignment: fix logic
commit96bd65357f78ca5497172ced885921c92c37dde9
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 12 Mar 2014 10:45:18 +0000 (12 11:45 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 19 Mar 2014 09:54:06 +0000 (19 10:54 +0100)
treecd4992af554ec3869cef0ce58703f78d7cef7ee0
parentd7a2537fc60da3e96ff3c1479c8fbeab61079e3f
scan.cc: clear_assignment: fix logic

The remainder of the method is supposed be executed when no value
was assigned to "decl" before, but we would actually return early
from the method when this condition holds.
This means that we would repeatedly perform the subsequent operations
even when they should no longer be needed, but, more importantly,
we could end up in the wrong state after the first call.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
scan.cc
tests/forward_substitution5.c [new file with mode: 0644]
tests/forward_substitution5.scop [new file with mode: 0644]