Fix issue #708: token pasting within macro argument expansion.
This commit is contained in:
@@ -63,6 +63,8 @@ ERROR: node is still EOpNull!
|
||||
0:? 4 (const int)
|
||||
0:? 'cop' (global int)
|
||||
0:? 'dop' (global bool)
|
||||
0:? 'argPaste2' (uniform int)
|
||||
0:? 'argPaste20suff' (uniform int)
|
||||
0:? 'gl_VertexID' (gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
|
||||
|
||||
@@ -107,6 +109,8 @@ ERROR: node is still EOpNull!
|
||||
0:? 4 (const int)
|
||||
0:? 'cop' (global int)
|
||||
0:? 'dop' (global bool)
|
||||
0:? 'argPaste2' (uniform int)
|
||||
0:? 'argPaste20suff' (uniform int)
|
||||
0:? 'gl_VertexID' (gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
|
||||
|
||||
|
||||
@@ -68,3 +68,12 @@ void foo()
|
||||
// recovery from bad op
|
||||
bool f = e MAKE_OP(>,!) 5;
|
||||
}
|
||||
|
||||
// arguments: should make 'uniform int argPaste2;'
|
||||
#define M_NEST(q) int q
|
||||
#define M_OUTER(p) M_NEST(p##2)
|
||||
uniform M_OUTER(argPaste);
|
||||
// should make 'uniform int argPaste20suff;'
|
||||
#define M_NEST2(q) int q ## suff
|
||||
#define M_OUTER2(p) M_NEST2(p ## 20)
|
||||
uniform M_OUTER2(argPaste);
|
||||
|
||||
Reference in New Issue
Block a user