[clang] [clang][CIR] Convert fixed-point values to bool enums like bool (PR #245930)
Sendao Yan via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 25 04:51:06 PST 2026
================
@@ -1069,7 +1075,7 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
// integers, we do not want to follow any logic that assumes they should be
// treated as integers.
if (srcType->isFixedPointType()) {
- if (dstType->isBooleanType()) {
+ if (hasBoolConversionSemantics(dstType)) {
----------------
sendaoYan wrote:
`++` is handled here; `--`, atomic increment and `e += <complex>` fail for plain `_Bool` in CIR too, so they need the `_Bool` lowering first — filed as #<issue>, follow-up PR after this lands.
https://github.com/llvm/llvm-project/pull/245930
More information about the cfe-commits
mailing list