Resubmit with clang build issue fixed. The result of a short-circuited
operation is now either 0 or 1.
ESSL 3.00 spec section 3.4 mentions that the second operand in a logical
&& or || preprocessor operation is evaluated only if the first operand
doesn't short-circuit the expression. The non-evaluated part of a
preprocessor expression may also have undefined identifiers.
Make the expression parser follow the spec by ignoring errors that are
generated inside short-circuited expressions. This includes undefined
identifiers and divide by zero.
BUG=angleproject:347
TEST=dEQP-GLES3.functional.shaders.preprocessor.undefined_identifiers.*
angle_unittests
Change-Id: I4163f96ec46d40ac859ffb39d91b89490041e44d
Reviewed-on: https://chromium-review.googlesource.com/297252Tested-by:
Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by:
Jamie Madill <jmadill@chromium.org>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| 64bit-tokenizer-safety.patch | Loading commit data... | |
| DiagnosticsBase.cpp | Loading commit data... | |
| DiagnosticsBase.h | Loading commit data... | |
| DirectiveHandlerBase.cpp | Loading commit data... | |
| DirectiveHandlerBase.h | Loading commit data... | |
| DirectiveParser.cpp | Loading commit data... | |
| DirectiveParser.h | Loading commit data... | |
| ExpressionParser.cpp | Loading commit data... | |
| ExpressionParser.h | Loading commit data... | |
| ExpressionParser.y | Loading commit data... | |
| Input.cpp | Loading commit data... | |
| Input.h | Loading commit data... | |
| Lexer.cpp | Loading commit data... | |
| Lexer.h | Loading commit data... | |
| Macro.cpp | Loading commit data... | |
| Macro.h | Loading commit data... | |
| MacroExpander.cpp | Loading commit data... | |
| MacroExpander.h | Loading commit data... | |
| Preprocessor.cpp | Loading commit data... | |
| Preprocessor.h | Loading commit data... | |
| SourceLocation.h | Loading commit data... | |
| Token.cpp | Loading commit data... | |
| Token.h | Loading commit data... | |
| Tokenizer.cpp | Loading commit data... | |
| Tokenizer.h | Loading commit data... | |
| Tokenizer.l | Loading commit data... | |
| generate_parser.sh | Loading commit data... | |
| numeric_lex.h | Loading commit data... | |
| pp_utils.h | Loading commit data... |