[clang] [clang][CIR] Convert fixed-point values to bool enums like bool (PR #245930)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 27 01:34:31 PST 2026
================
@@ -648,7 +648,7 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
bool isPre = e->isPrefix();
// Bools are always set-to-true, as decrement isn't legal on bools.
- if (valType->isBooleanType()) {
+ if (isInc && valType->hasBooleanConversionSemantics()) {
assert(isInc);
----------------
xlauko wrote:
Redundant now that the condition has `isInc &&`. The "decrement isn't legal on bools" comment above is stale too.
https://github.com/llvm/llvm-project/pull/245930
More information about the cfe-commits
mailing list