[clang] [LifetimeSafety] Verify lifetime_capture_by(X) against the body (PR #207346)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 16 06:57:44 PST 2026
================
@@ -0,0 +1,154 @@
+// RUN: %clang_cc1 -fsyntax-only -Wlifetime-safety-capture-by-violation -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wlifetime-safety-annotation-verification -verify=expected,verification %s
+
+#include "Inputs/lifetime-analysis.h"
+
+struct Cap { const int *p; };
+const int *global; // #global
----------------
Xazax-hun wrote:
Fair, updated the tests.
https://github.com/llvm/llvm-project/pull/207346
More information about the cfe-commits
mailing list