Disallow bit-shifting when the left operand is negative.

BUG=648063

Change-Id: I82d9fbdaf8791a396dd71eeb57d93967ba5d65bf
Reviewed-on: https://chromium-review.googlesource.com/387115
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/compiler/preprocessor/ExpressionParser.y b/src/compiler/preprocessor/ExpressionParser.y
index dc0080e..3f7fc62 100644
--- a/src/compiler/preprocessor/ExpressionParser.y
+++ b/src/compiler/preprocessor/ExpressionParser.y
@@ -196,7 +196,7 @@
         $$ = $1 < $3;
     }
     | expression TOK_OP_RIGHT expression {
-        if ($3 < 0)
+        if ($2 < 0 || $3 < 0)
         {
             if (!context->isIgnoringErrors())
             {
@@ -216,7 +216,7 @@
         }
     }
     | expression TOK_OP_LEFT expression {
-        if ($3 < 0)
+        if ($2 < 0 || $3 < 0)
         {
             if (!context->isIgnoringErrors())
             {