From 4c977744ba3f99cd0c71773c684a3247af4ba98a Mon Sep 17 00:00:00 2001 From: Andres Gomez Date: Sat, 8 Sep 2018 01:03:13 +0300 Subject: [PATCH] Revert "Revert "glsl: skip stringification in preprocessor if in unreachable branch"" This reverts commit 2fd6f06faabb5b16d529e035ae4523a8566bf9bc. Take back 28a3731e3f4 ("glsl: skip stringification in preprocessor if in unreachable branch") after b9fe8ff23dc ("glsl: fixer lexer for unreachable defines") has made it to the branch. Signed-off-by: Andres Gomez --- src/compiler/glsl/glcpp/glcpp-lex.l | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/glcpp/glcpp-lex.l b/src/compiler/glsl/glcpp/glcpp-lex.l index 05447b31e4c..f7003da0cc8 100644 --- a/src/compiler/glsl/glcpp/glcpp-lex.l +++ b/src/compiler/glsl/glcpp/glcpp-lex.l @@ -434,8 +434,10 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? /* This will catch any non-directive garbage after a HASH */ {NONSPACE} { - BEGIN INITIAL; - RETURN_TOKEN (GARBAGE); + if (!parser->skipping) { + BEGIN INITIAL; + RETURN_TOKEN (GARBAGE); + } } /* An identifier immediately followed by '(' */