Fixing issue #803. The issue is that the macro expansion code that decides whether a variable has to be renamed because it clashes with a variable declared at the macro usage site sometimes claims that that variable names are used that actually aren't.
In particular, the code
checks which names are declared at the macro call site in the original program
separately keeps track of variable names that are declared at the macro call site as a result of previous macro expansions.
That second step doesn't always work correctly, since there is a single set that keeps track of which names are added because of macro expansion. As a result, variable names that are added in one place as a result of a macro expansion count as used even in different scopes.
This PR fixes that by tracking which names are added per scope.
Fixing issue #803. The issue is that the macro expansion code that decides whether a variable has to be renamed because it clashes with a variable declared at the macro usage site sometimes claims that that variable names are used that actually aren't.
In particular, the code
That second step doesn't always work correctly, since there is a single set that keeps track of which names are added because of macro expansion. As a result, variable names that are added in one place as a result of a macro expansion count as used even in different scopes.
This PR fixes that by tracking which names are added per scope.