From b2c9fccb89bdc5d927fb299de9eec822383dee86 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Mon, 13 Apr 2020 12:34:20 -0400 Subject: Remove Not constant folding - because it doesn't take into account the type change. (#1317) Co-authored-by: Tim Foley --- source/slang/slang-parser.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'source/slang/slang-parser.cpp') diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp index 170178932..d8b0d9463 100644 --- a/source/slang/slang-parser.cpp +++ b/source/slang/slang-parser.cpp @@ -4710,7 +4710,6 @@ namespace Slang { switch (tokenType) { - case TokenType::OpNot: return !value; case TokenType::OpBitNot: return ~value; case TokenType::OpAdd: return value; case TokenType::OpSub: return -value; @@ -4726,7 +4725,6 @@ namespace Slang { switch (tokenType) { - case TokenType::OpNot: return !value; case TokenType::OpAdd: return value; case TokenType::OpSub: return -value; default: @@ -4745,7 +4743,7 @@ namespace Slang default: return parsePostfixExpr(parser); - + case TokenType::OpNot: case TokenType::OpInc: case TokenType::OpDec: { @@ -4758,7 +4756,6 @@ namespace Slang prefixExpr->Arguments.add(arg); return prefixExpr; } - case TokenType::OpNot: case TokenType::OpBitNot: case TokenType::OpAdd: case TokenType::OpSub: -- cgit v1.2.3