commit | 6aab06e0e5d43907861063b3a652603cdc7f986e | [log] [tgz] |
---|---|---|
author | Geoff Lang <geofflang@chromium.org> | Tue Nov 20 14:04:11 2018 -0500 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Nov 21 14:38:37 2018 +0000 |
tree | 0157e2886cc0e868907b42faa81671993859c984 | |
parent | 836674c28b1ec3ac1e28a4435594b5258cdd3a69 [diff] [blame] |
Don't allow unary operators on void types. BUG=900058 Change-Id: Ice8976ddd9cbc9c90162cf7fae2b8f91ddcfcef3 Reviewed-on: https://chromium-review.googlesource.com/c/1344590 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp index 77ed235..d4123f6 100644 --- a/src/compiler/translator/ParseContext.cpp +++ b/src/compiler/translator/ParseContext.cpp
@@ -4962,7 +4962,7 @@ case EOpPositive: if (child->getBasicType() == EbtStruct || child->isInterfaceBlock() || child->getBasicType() == EbtBool || child->isArray() || - IsOpaqueType(child->getBasicType())) + child->getBasicType() == EbtVoid || IsOpaqueType(child->getBasicType())) { unaryOpError(loc, GetOperatorString(op), child->getType()); return nullptr;