[clang] [analyzer] Implement LifetimeAnnotations checker (PR #205521)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 24 05:36:35 PDT 2026
================
@@ -0,0 +1,10 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.cplusplus.LifetimeAnnotations,debug.DebugLifetimeAnnotations -verify %s
+
+// expected-no-diagnostics
+
+void clang_analyzer_lifetime_bound(int);
+
+void test() {
+ int x = 5;
+ clang_analyzer_lifetime_bound(x); // no-warning: verifies debug checker does not crash standalone
----------------
steakhal wrote:
What does `standalone` mean if the `alpha.cplusplus.LifetimeAnnotations` is enabled in the RUN line?
https://github.com/llvm/llvm-project/pull/205521
More information about the cfe-commits
mailing list