mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
Add test (and fix) for a function argument of a macro that expands with a comma.
The fix here is quite simple (and actually only deletes code). When expanding a macro, we don't return a ',' as a unique token type, but simply let it fall through to the generic case.
This commit is contained in:
parent
9f3d2c4e3d
commit
805ea6afe6
2 changed files with 3 additions and 2 deletions
|
|
@ -779,8 +779,6 @@ glcpp_parser_lex (glcpp_parser_t *parser)
|
|||
return '(';
|
||||
else if (strcmp (replacements->value, ")") == 0)
|
||||
return ')';
|
||||
else if (strcmp (replacements->value, ",") == 0)
|
||||
return ',';
|
||||
|
||||
yylval.str = xtalloc_strdup (parser, replacements->value);
|
||||
|
||||
|
|
|
|||
3
tests/039-func-arg-obj-macro-with-comma.c
Normal file
3
tests/039-func-arg-obj-macro-with-comma.c
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#define foo(a) (a)
|
||||
#define bar two,words
|
||||
foo(bar)
|
||||
Loading…
Add table
Reference in a new issue