Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GLSL: Fix integer overflow warnings in Constant.cpp
New versions of Clang warn: ``` glslang/MachineIndependent/Constant.cpp(216,114): error: overflow in expression; result is -9223372036854775808 with type 'long long' [-Werror,-Winteger-overflow] else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == (long long)-0x8000000000000000ll) ^ glslang/MachineIndependent/Constant.cpp(217,61): error: overflow in expression; result is -9223372036854775808 with type 'long long' [-Werror,-Winteger-overflow] newConstArray[i].setI64Const((long long)-0x8000000000000000ll); ^ 2 errors generated. ``` Using LLONG_MIN instead avoids the problem. I think it's also more clear, and the code for EOpMod further down already does this.
- Loading branch information