[llvm-branch-commits] [clang] Fix evaluation of the unsigned enumeration values, #108766 (PR #108768)

2024-09-16 Thread Dmitry Fursov via llvm-branch-commits
https://github.com/fursov closed https://github.com/llvm/llvm-project/pull/108768 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] Fix evaluation of the unsigned enumeration values, #108766 (PR #108768)

2024-09-15 Thread Dmitry Fursov via llvm-branch-commits
https://github.com/fursov created https://github.com/llvm/llvm-project/pull/108768 If the type of an enumeration is not native (e.g. uint8_t) but is unsigned then evaluation of the value might get wrong: for values bigger than half of type range the return value will be negative. This happens