--- /dev/null
+cppBad2.vert
+ERROR: 0:3: 'macro expansion' : End of input in macro b
+ERROR: 0:3: '' : 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
+
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
-#define GLSLANG_REVISION "Overload400-PrecQual.1727"
+#define GLSLANG_REVISION "Overload400-PrecQual.1728"
#define GLSLANG_DATE "02-Jan-2017"
TokenStream* expandedArg = new TokenStream;
pushInput(new tMarkerInput(this));
pushTokenStreamInput(arg);
- while ((token = scanToken(ppToken)) != tMarkerInput::marker) {
+ while ((token = scanToken(ppToken)) != tMarkerInput::marker && token != EndOfInput) {
if (token == PpAtomIdentifier && MacroExpand(ppToken, false, newLineOkay) != 0)
continue;
RecordToken(*expandedArg, token, ppToken);
}
- popInput();
+
+ if (token == EndOfInput) {
+ // MacroExpand ate the marker, so had bad input, recover
+ delete expandedArg;
+ expandedArg = nullptr;
+ } else {
+ // remove the marker
+ popInput();
+ }
return expandedArg;
}
depth = 0;
while (1) {
token = scanToken(ppToken);
- if (token == EndOfInput) {
+ if (token == EndOfInput || token == tMarkerInput::marker) {
parseContext.ppError(loc, "End of input in macro", "macro expansion", atomStrings.getString(macroAtom));
delete in;
return 0;