Fix double expansion of macro arguments.

This adds a new fullyExpanded flag that makes sure that macro arguments
only get expanded once. This can happen either in PrescanMacroArg, or, if
there is token pasting or a function-like macro name has been passed as
an argument and may need to be expanded when used as a function.
This commit is contained in:
Arcady Goldmints-Orlov 2023-02-23 11:01:37 -05:00 committed by arcady-lunarg
parent 14e5a04e70
commit c43008e829
6 changed files with 39 additions and 15 deletions

View file

@ -480,9 +480,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
E_GL_EXT_shader_explicit_arithmetic_types_int16 };
static const int Num_Int16_Extensions = sizeof(Int16_Extensions) / sizeof(Int16_Extensions[0]);
ppToken->ival = 0;
ppToken->i64val = 0;
ppToken->space = false;
ppToken->clear();
ch = getch();
for (;;) {
while (ch == ' ' || ch == '\t') {