If the argument is a CommaExp, set a flag to prevent deprecation messages
It's impossible to know from CommaExp.semantic if the result will
be used, hence when there is a result (type != void), a deprecation
message is always emitted.
However, some construct can produce a result but won't use it
(ExpStatement and for loop increment). Those should call this function
to prevent unwanted deprecations to be emitted.
If the argument is a CommaExp, set a flag to prevent deprecation messages
It's impossible to know from CommaExp.semantic if the result will be used, hence when there is a result (type != void), a deprecation message is always emitted. However, some construct can produce a result but won't use it (ExpStatement and for loop increment). Those should call this function to prevent unwanted deprecations to be emitted.