[clang] [Clang] Initialize bypassed variables w/ trivial-auto-var-init (PR #181937)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 18 17:52:58 PDT 2026


================
@@ -1749,6 +1757,8 @@ void CodeGenFunction::EmitCaseStmtRange(const CaseStmt &S,
   // switch machinery to enter this block.
   llvm::BasicBlock *CaseDest = createBasicBlock("sw.bb");
   EmitBlockWithFallThrough(CaseDest, &S);
+  if (getLangOpts().CPlusPlus)
----------------
efriedma-quic wrote:

Do we also need to check `!Bypasses.isAlwaysBypassed()` here, and other similar places?  If I'm understanding correctly, EmitAutoVarAlloca flips to the C-style rules for any function containing a computed goto.

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


More information about the cfe-commits mailing list