preprocessor: Fix negative shift with bad ids.

Fix this by producing an error on undefined or negative shifts.

BUG=629518

Change-Id: Idfca5ed3fc8e557f6178408f3426a5ef2ce7cf14
Reviewed-on: https://chromium-review.googlesource.com/362020
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/preprocessor/DiagnosticsBase.cpp b/src/compiler/preprocessor/DiagnosticsBase.cpp
index 68c6e9c..9f62a9e 100644
--- a/src/compiler/preprocessor/DiagnosticsBase.cpp
+++ b/src/compiler/preprocessor/DiagnosticsBase.cpp
@@ -115,6 +115,8 @@
         return "invalid line directive";
       case PP_NON_PP_TOKEN_BEFORE_EXTENSION_ESSL3:
         return "extension directive must occur before any non-preprocessor tokens in ESSL3";
+      case PP_UNDEFINED_SHIFT:
+          return "shift exponent is negative or undefined";
       // Errors end.
       // Warnings begin.
       case PP_EOF_IN_DIRECTIVE: