diff options
author | Carl Worth <cworth@cworth.org> | 2014-07-01 17:58:37 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2014-08-07 16:08:29 -0700 |
commit | c0127c30ddf0d10c38c36288e44187ec59ccf838 (patch) | |
tree | 4c4cfeae45ca4c595e8d1b446e6182fc4eaf7d84 /src/glsl/glcpp | |
parent | e84e159caac200287f1aada3c5c57aa3bf5cc376 (diff) | |
download | external_mesa3d-c0127c30ddf0d10c38c36288e44187ec59ccf838.zip external_mesa3d-c0127c30ddf0d10c38c36288e44187ec59ccf838.tar.gz external_mesa3d-c0127c30ddf0d10c38c36288e44187ec59ccf838.tar.bz2 |
glsl/glcpp: Fix NULL directives when followed by a single-line comment
This is the fix for the following line:
# // comment to ignore here
According to the translation-phase rules, the comment should be removed before
the preprocessor looks to interpret the null directive.
So in our implementation we must explicitly look for single-line comments in
the <HASH> start condition as well.
This commit fixes the following Khronos GLES3 CTS tests:
null_directive_vertex
null_directive_fragment
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/glsl/glcpp')
-rw-r--r-- | src/glsl/glcpp/glcpp-lex.l | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l index 2cfe203..2b92fd3 100644 --- a/src/glsl/glcpp/glcpp-lex.l +++ b/src/glsl/glcpp/glcpp-lex.l @@ -250,7 +250,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? } /* Single-line comments */ -<INITIAL,DEFINE>"//"[^\r\n]* { +<INITIAL,DEFINE,HASH>"//"[^\r\n]* { } /* Multi-line comments */ |