================ @@ -5452,6 +5477,11 @@ bool Compiler<Emitter>::visitSwitchStmt(const SwitchStmt *S) { if (!this->emitSetLocal(CondT, CondVar, S)) return false; + if (auto *DD = + dyn_cast_if_present<DecompositionDecl>(S->getConditionVariable())) + if (!this->emitDecompositionVarInit(DD)) + return false; ---------------- mizvekov wrote:
Nit: ```suggestion if (auto *DD = dyn_cast_if_present<DecompositionDecl>(S->getConditionVariable()); DD && !this->emitDecompositionVarInit(DD)) return false; ``` Maybe also deduplicate with the above. https://github.com/llvm/llvm-project/pull/130228 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits