summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/tests/069-repeated-argument.c
diff options
context:
space:
mode:
authorCarl Worth <[email protected]>2010-07-22 16:36:04 -0700
committerCarl Worth <[email protected]>2010-07-22 16:38:12 -0700
commitfbe4240626bfe102a9c4c889ee18cb9ea27bddec (patch)
treedf8e7fdcfc73a32972a2605e5c9db248f86b9f41 /src/glsl/glcpp/tests/069-repeated-argument.c
parenta0879b9dd438d78635f047cdd5ed4c72bc831b60 (diff)
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)
Diffstat (limited to 'src/glsl/glcpp/tests/069-repeated-argument.c')
-rw-r--r--src/glsl/glcpp/tests/069-repeated-argument.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/glcpp/tests/069-repeated-argument.c b/src/glsl/glcpp/tests/069-repeated-argument.c
new file mode 100644
index 00000000000..2b46ead294c
--- /dev/null
+++ b/src/glsl/glcpp/tests/069-repeated-argument.c
@@ -0,0 +1,2 @@
+#define double(x) x x
+double(1)