Commit b819d25d by Geoff Lang

Validate that there are no tokens following #undef on the same line.

Fixes: dEQP-GLES2.functional.shaders.preprocessor.definitions.undefine_object_invalid_syntax_vertex dEQP-GLES2.functional.shaders.preprocessor.definitions.undefine_object_invalid_syntax_fragment dEQP-GLES2.functional.shaders.preprocessor.invalid_definitions.undef_non_identifier_2_vertex dEQP-GLES2.functional.shaders.preprocessor.invalid_definitions.undef_non_identifier_2_fragment BUG=angleproject:989 Change-Id: I279a38aaae8010017ef6e3f1aa139ae03f374680 Reviewed-on: https://chromium-review.googlesource.com/267397Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 3da79b7b
...@@ -435,6 +435,12 @@ void DirectiveParser::parseUndef(Token *token) ...@@ -435,6 +435,12 @@ void DirectiveParser::parseUndef(Token *token)
} }
mTokenizer->lex(token); mTokenizer->lex(token);
if (!isEOD(token))
{
mDiagnostics->report(Diagnostics::PP_UNEXPECTED_TOKEN,
token->location, token->text);
skipUntilEOD(mTokenizer, token);
}
} }
void DirectiveParser::parseIf(Token *token) void DirectiveParser::parseIf(Token *token)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment