[clang] [CIR] Upstream support for switch statements case kinds (PR #138003)
via cfe-commits
cfe-commits at lists.llvm.org
Mon May 5 08:35:47 PDT 2025
================
@@ -455,7 +456,8 @@ CIRGenFunction::emitCaseDefaultCascade(const T *stmt, mlir::Type condType,
if (isa<DefaultStmt>(sub) && isa<CaseStmt>(stmt)) {
subStmtKind = SubStmtKind::Default;
builder.createYield(loc);
- } else if (isa<CaseStmt>(sub) && isa<DefaultStmt>(stmt)) {
+ } else if ((isa<CaseStmt>(sub) && isa<DefaultStmt>(stmt)) ||
----------------
Andres-Salamanca wrote:
When we find a cascading case like `case -> case`, we emit a `yield` to indicate a fallthrough.
https://github.com/llvm/llvm-project/pull/138003
More information about the cfe-commits
mailing list