[clang] [CIR]/[OGCG] Fix handling of bool-backed-scoped-enums (PR #214084)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 5 04:14:20 PDT 2026


================
@@ -870,6 +870,11 @@ mlir::LogicalResult CIRGenFunction::emitCaseStmt(const CaseStmt &s,
   mlir::ArrayAttr value;
   llvm::APSInt intVal = s.getLHS()->EvaluateKnownConstInt(getContext());
 
+  // coerce a bool to an i1 for a switch, so we can just treat all its elements
----------------
AaronBallman wrote:

```suggestion
  // Coerce a bool to an i1 for a switch, so we can just treat all its elements
```

https://github.com/llvm/llvm-project/pull/214084


More information about the cfe-commits mailing list