Remove extraInfo parameter from compiler diagnostic functions

This makes error messages more consistent. It was not clear what was
supposed to go to the extraInfo parameter, and previously it was
mostly being misused, resulting in poorly formatted error messages.
Sometimes the order of parameters to the diagnostic functions like
error() and warning() was wrong altogether. The diagnostics API is
simpler when there's only the "reason" and "token" parameters that
have clear meaning and that are separated by consistent punctuation
in the output.

Fixes error messages like

"redifinition interface block member"

to be grammatically reasonable like the rest of the error messages. For
other error messages, punctuation is added to make them clearer. Example:

"invalid layout qualifier location requires an argument"

is changed to

"invalid layout qualifier: location requires an argument".

Extra spaces are also removed from the beginning of error messages.

BUG=angleproject:1670
BUG=angleproject:911
TEST=angle_unittests

Change-Id: Id5fb1a1f2892fad2b796aaef47ffb07e9d79759c
Reviewed-on: https://chromium-review.googlesource.com/420789
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/ConstantUnion.cpp b/src/compiler/translator/ConstantUnion.cpp
index 539a375..cab1031 100644
--- a/src/compiler/translator/ConstantUnion.cpp
+++ b/src/compiler/translator/ConstantUnion.cpp
@@ -21,11 +21,11 @@
     float result = lhs + rhs;
     if (gl::isNaN(result) && !gl::isNaN(lhs) && !gl::isNaN(rhs))
     {
-        diag->warning(line, "Constant folded undefined addition generated NaN", "+", "");
+        diag->warning(line, "Constant folded undefined addition generated NaN", "+");
     }
     else if (gl::isInf(result) && !gl::isInf(lhs) && !gl::isInf(rhs))
     {
-        diag->warning(line, "Constant folded addition overflowed to infinity", "+", "");
+        diag->warning(line, "Constant folded addition overflowed to infinity", "+");
     }
     return result;
 }
@@ -35,11 +35,11 @@
     float result = lhs - rhs;
     if (gl::isNaN(result) && !gl::isNaN(lhs) && !gl::isNaN(rhs))
     {
-        diag->warning(line, "Constant folded undefined subtraction generated NaN", "-", "");
+        diag->warning(line, "Constant folded undefined subtraction generated NaN", "-");
     }
     else if (gl::isInf(result) && !gl::isInf(lhs) && !gl::isInf(rhs))
     {
-        diag->warning(line, "Constant folded subtraction overflowed to infinity", "-", "");
+        diag->warning(line, "Constant folded subtraction overflowed to infinity", "-");
     }
     return result;
 }
@@ -49,11 +49,11 @@
     float result = lhs * rhs;
     if (gl::isNaN(result) && !gl::isNaN(lhs) && !gl::isNaN(rhs))
     {
-        diag->warning(line, "Constant folded undefined multiplication generated NaN", "*", "");
+        diag->warning(line, "Constant folded undefined multiplication generated NaN", "*");
     }
     else if (gl::isInf(result) && !gl::isInf(lhs) && !gl::isInf(rhs))
     {
-        diag->warning(line, "Constant folded multiplication overflowed to infinity", "*", "");
+        diag->warning(line, "Constant folded multiplication overflowed to infinity", "*");
     }
     return result;
 }
@@ -380,7 +380,7 @@
     if ((rhs.type == EbtInt && (rhs.iConst < 0 || rhs.iConst > 31)) ||
         (rhs.type == EbtUInt && rhs.uConst > 31u))
     {
-        diag->error(line, "Undefined shift (operand out of range)", ">>", "");
+        diag->error(line, "Undefined shift (operand out of range)", ">>");
         switch (lhs.type)
         {
             case EbtInt:
@@ -487,7 +487,7 @@
     if ((rhs.type == EbtInt && (rhs.iConst < 0 || rhs.iConst > 31)) ||
         (rhs.type == EbtUInt && rhs.uConst > 31u))
     {
-        diag->error(line, "Undefined shift (operand out of range)", "<<", "");
+        diag->error(line, "Undefined shift (operand out of range)", "<<");
         switch (lhs.type)
         {
             case EbtInt: