Tests: Add test for ways of calling no-argument macro with ().
This commit is contained in:
30
Test/preprocessor.simple.vert
Normal file → Executable file
30
Test/preprocessor.simple.vert
Normal file → Executable file
@@ -27,3 +27,33 @@ int main() {
|
||||
+= -= *= /= %= <<= >>= &= |= ^=
|
||||
1.2 2E10 5u -5lf
|
||||
}
|
||||
|
||||
struct S {
|
||||
int member1;
|
||||
float member2;
|
||||
vec4 member3;
|
||||
};
|
||||
|
||||
#define xyz xxyz
|
||||
#define yzy() yyz
|
||||
|
||||
#define LIGHTING_COMMON_BRDF() \
|
||||
vec3 a = vec3(0); \
|
||||
vec3 b = a.zxyz; \
|
||||
vec3 b = a.xyz; \
|
||||
vec3 b = a.yzy(); \
|
||||
vec3 b = a.xyz(); \
|
||||
vec3 b = a.yzy; \
|
||||
vec3 b = a.z;
|
||||
|
||||
void foo()
|
||||
{
|
||||
S s;
|
||||
s.member2 + s.member1;
|
||||
s.member3.zyx;
|
||||
s.member2.xyz;
|
||||
s.member2.yzy();
|
||||
s.member2.xyz();
|
||||
s.member2.yzy;
|
||||
LIGHTING_COMMON_BRDF()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user