glcpp: Fix function-like macros with an argument used multiple times.

It's really hard to believe that this case has been broken, but apparently
no test previously exercised it. So this commit adds such a test and fixes
it by making a copy of the argument token-list before expanding it.

This fix causes the following glean tests to now pass:

	glsl1-Preprocessor test 6 (#if 0, #define macro)
	glsl1-Preprocessor test 7 (multi-line #define)
This commit is contained in:
Carl Worth
2010-07-22 16:36:04 -07:00
parent a0879b9dd4
commit fbe4240626
2 changed files with 9 additions and 3 deletions
@@ -0,0 +1,2 @@
#define double(x) x x
double(1)