diff --git a/Test/baseResults/cppBad.vert.out b/Test/baseResults/cppBad.vert.out index bd7c1416c55ecb545ac3198b5943a88a05a0b3ea..6938af6a958442dc1d8b05e661b30ae01f153ade 100755 --- a/Test/baseResults/cppBad.vert.out +++ b/Test/baseResults/cppBad.vert.out @@ -1,8 +1,10 @@ cppBad.vert ERROR: 0:2: 'preprocessor evaluation' : bad expression ERROR: 0:2: '#if' : unexpected tokens following directive -ERROR: 0:3: '' : missing #endif -ERROR: 3 compilation errors. No code generated. +ERROR: 0:5: 'string' : End of line in string +ERROR: 0:5: 'macro expansion' : expected '(' following n +ERROR: 0:5: '' : syntax error +ERROR: 5 compilation errors. No code generated. Shader version: 100 diff --git a/Test/cppBad.vert b/Test/cppBad.vert index bb1626eabcaeae57e0022752f0f2590a89d99326..49600f91670877c99df04423abd283b15aa10667 100644 --- a/Test/cppBad.vert +++ b/Test/cppBad.vert @@ -1,2 +1,5 @@ #define m#0# #if m + +#define n() +int n" \ No newline at end of file diff --git a/glslang/Include/revision.h b/glslang/Include/revision.h index 88fc55315d75f9de0abcb5f6578306e36fffdee7..2badfd2d4a51c5dd99e853c783978583676698e2 100644 --- a/glslang/Include/revision.h +++ b/glslang/Include/revision.h @@ -2,5 +2,5 @@ // 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 "SPIRV99.1373" +#define GLSLANG_REVISION "SPIRV99.1374" #define GLSLANG_DATE "30-Jul-2016" diff --git a/glslang/MachineIndependent/Scan.cpp b/glslang/MachineIndependent/Scan.cpp index 7f60ddcca87998e17e21b4278e91f992050c2efe..e297e34420886e478409937f2b91b8fe925e567b 100644 --- a/glslang/MachineIndependent/Scan.cpp +++ b/glslang/MachineIndependent/Scan.cpp @@ -612,13 +612,15 @@ void TScanContext::deleteKeywordMap() ReservedSet = nullptr; } +// Called by yylex to get the next token. +// Returning 0 implies end of input. int TScanContext::tokenize(TPpContext* pp, TParserToken& token) { do { parserToken = &token; TPpToken ppToken; tokenText = pp->tokenize(&ppToken); - if (tokenText == nullptr) + if (tokenText == nullptr || tokenText[0] == 0) return 0; loc = ppToken.loc;