PP: Fix #1694: Rationalize errors on partially expanded macro argument.

This commit is contained in:
John Kessenich
2019-02-16 07:35:13 -07:00
parent da1be9a322
commit 6fee94460f
9 changed files with 58 additions and 9 deletions

View File

@@ -1,6 +1,7 @@
cppBad2.vert
ERROR: 0:3: 'macro expansion' : End of input in macro b
ERROR: 1 compilation errors. No code generated.
ERROR: 0:3: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
Shader version: 100

View File

@@ -1,6 +1,7 @@
cppBad3.vert
ERROR: 0:3: 'macro expansion' : End of input in macro y
ERROR: 1 compilation errors. No code generated.
ERROR: 0:3: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
Shader version: 100

View File

@@ -0,0 +1,19 @@
cppBad4.vert
ERROR: 0:4: 'macro expansion' : unexpected '#' g
ERROR: 0:5: '' : syntax error, unexpected SEMICOLON, expecting LEFT_PAREN
ERROR: 2 compilation errors. No code generated.
Shader version: 100
ERROR: node is still EOpNull!
0:? Linker Objects
Linked vertex stage:
ERROR: Linking vertex stage: Missing entry point: Each stage requires one entry point
Shader version: 100
ERROR: node is still EOpNull!
0:? Linker Objects

View File

@@ -0,0 +1,19 @@
cppBad5.vert
ERROR: 0:4: 'macro expansion' : End of input in macro g
ERROR: 0:5: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
Shader version: 100
ERROR: node is still EOpNull!
0:? Linker Objects
Linked vertex stage:
ERROR: Linking vertex stage: Missing entry point: Each stage requires one entry point
Shader version: 100
ERROR: node is still EOpNull!
0:? Linker Objects

4
Test/cppBad4.vert Executable file
View File

@@ -0,0 +1,4 @@
int,i=
#define f g(#g(y
#define g(m)
g(f)

4
Test/cppBad5.vert Executable file
View File

@@ -0,0 +1,4 @@
int,i=
#define f g($g(y
#define g(m)
g(f)