Teach sparse about the __COUNTER__ predefined macro

__COUNTER__ macro is expanded to a sequential number starting from 0.
This is sometimes used to declare unique variable names.

Implement support for __COUNTER__ in sparse including a set of
small test programs for the test suite.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
6 files changed