================
@@ -1106,6 +1106,7 @@ mlir::LogicalResult CIRGenFunction::emitSwitchStmt(const 
clang::SwitchStmt &s) {
     terminateBody(builder, caseOp.getCaseRegion(), caseOp.getLoc());
   terminateBody(builder, swop.getBody(), swop.getLoc());
 
+  
swop.setHandlingEnum(s.getCond()->IgnoreParenImpCasts()->getType()->isEnumeralType());
----------------
bcardosolopes wrote:

Assuming `s.isAllEnumCasesCovered()` implies this is an enum, the type should 
be `isEnumeralType` everytime that returns true? Might be worth adding an 
assert here in case somehow they differ

https://github.com/llvm/llvm-project/pull/172236
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to