Don't accept sampler operands for unary operators

Unary plus and minus used to be accepted with sampler operands.
Increment/decrement operators also now generate a clearer error
message if a sampler operand is supplied.

TEST=angle_unittests
BUG=angleproject:1480

Change-Id: I2c5165c4eaac7b023d96e46a177e36f6536b0125
Reviewed-on: https://chromium-review.googlesource.com/376319
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp
index 3edabe4..5e15eea 100644
--- a/src/compiler/translator/ParseContext.cpp
+++ b/src/compiler/translator/ParseContext.cpp
@@ -3402,7 +3402,7 @@
         case EOpNegative:
         case EOpPositive:
             if (child->getBasicType() == EbtStruct || child->getBasicType() == EbtBool ||
-                child->isArray())
+                child->isArray() || IsSampler(child->getBasicType()))
             {
                 return nullptr;
             }