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

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 10 18:03:40 PDT 2026


================
@@ -47,6 +47,10 @@ class VarBypassDetector {
   llvm::DenseMap<const Stmt *, unsigned> ToScopes;
   // Set of variables which were bypassed by some jump.
   llvm::DenseSet<const VarDecl *> Bypasses;
+  // Map from a bypassing jump (goto/switch case) to the variable declarations
+  // it bypasses. Used to reinitialize those variables at the jump (C++ only).
----------------
efriedma-quic wrote:

Outdated comment "C++ only".

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


More information about the cfe-commits mailing list