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:
parent
14e5a04e70
commit
c43008e829
6 changed files with 39 additions and 15 deletions
|
|
@ -13,8 +13,11 @@
|
|||
)\
|
||||
4 + 3 + Y
|
||||
|
||||
#define F F.a
|
||||
|
||||
int main() {
|
||||
gl_Position = vec4(X(3), Y(3, 4), Z(3));
|
||||
gl_Position = vec4(REALLY_LONG_MACRO_NAME_WITH_MANY_PARAMETERS(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12));
|
||||
gl_Position = vec4(A(3));
|
||||
gl_Position = A(F);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue