[clang] [LifetimeSafety] Diagnose UAF for aligned and nothrow new expressions (PR #202286)

Zeyi Xu via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 8 02:13:09 PDT 2026


================
@@ -3594,4 +3638,4 @@ void capturing_multiple_locals() {
         setCaptureBy(v, local2);    // expected-warning{{local variable 'local2' does not live long enough}}
     }                               // expected-note 2 {{destroyed here}} 
     (void)v;                        // expected-note 2 {{later used here}}
-}
\ No newline at end of file
+}
----------------
zeyi2 wrote:

Drive by newline at EOF fix

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


More information about the cfe-commits mailing list