[clang] [CIR] Emit lifetime markers for automatic variables (PR #206695)

Sirui Mu via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 30 06:40:38 PDT 2026


================
@@ -28,6 +30,20 @@
 using namespace clang;
 using namespace clang::CIRGen;
 
+/// Does the statement tree rooted at \p s contain a label, switch, or indirect
+/// goto that could bypass a local's initialization? A coarse stand-in for
+/// classic CodeGen's per-decl bypass analysis (PR28267).
+static bool functionMightHaveBypass(const Stmt *s) {
----------------
Lancern wrote:

Do we have a test that examines the path where this function returns `true`?

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


More information about the cfe-commits mailing list