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/IntermNode.cpp b/src/compiler/translator/IntermNode.cpp
index a251cb8..8a530b6 100644
--- a/src/compiler/translator/IntermNode.cpp
+++ b/src/compiler/translator/IntermNode.cpp
@@ -54,7 +54,7 @@
                                    TConstantUnion *result)
 {
     diagnostics->warning(loc, "operation result is undefined for the values passed in",
-                         GetOperatorString(op), "");
+                         GetOperatorString(op));
 
     switch (basicType)
     {
@@ -1342,13 +1342,13 @@
                                 diagnostics->warning(
                                     getLine(),
                                     "Zero divided by zero during constant folding generated NaN",
-                                    "/", "");
+                                    "/");
                                 resultArray[i].setFConst(std::numeric_limits<float>::quiet_NaN());
                             }
                             else
                             {
-                                diagnostics->warning(
-                                    getLine(), "Divide by zero during constant folding", "/", "");
+                                diagnostics->warning(getLine(),
+                                                     "Divide by zero during constant folding", "/");
                                 bool negativeResult =
                                     std::signbit(dividend) != std::signbit(divisor);
                                 resultArray[i].setFConst(
@@ -1361,7 +1361,7 @@
                             diagnostics->warning(getLine(),
                                                  "Infinity divided by infinity during constant "
                                                  "folding generated NaN",
-                                                 "/", "");
+                                                 "/");
                             resultArray[i].setFConst(std::numeric_limits<float>::quiet_NaN());
                         }
                         else
@@ -1371,7 +1371,7 @@
                             {
                                 diagnostics->warning(
                                     getLine(), "Constant folded division overflowed to infinity",
-                                    "/", "");
+                                    "/");
                             }
                             resultArray[i].setFConst(result);
                         }
@@ -1381,7 +1381,7 @@
                         if (rightArray[i] == 0)
                         {
                             diagnostics->warning(
-                                getLine(), "Divide by zero error during constant folding", "/", "");
+                                getLine(), "Divide by zero error during constant folding", "/");
                             resultArray[i].setIConst(INT_MAX);
                         }
                         else
@@ -1418,7 +1418,7 @@
                                     diagnostics->warning(getLine(),
                                                          "Negative modulus operator operand "
                                                          "encountered during constant folding",
-                                                         "%", "");
+                                                         "%");
                                     resultArray[i].setIConst(0);
                                 }
                                 else
@@ -1433,7 +1433,7 @@
                         if (rightArray[i] == 0)
                         {
                             diagnostics->warning(
-                                getLine(), "Divide by zero error during constant folding", "/", "");
+                                getLine(), "Divide by zero error during constant folding", "/");
                             resultArray[i].setUConst(UINT_MAX);
                         }
                         else