[clang] [llvm] [analyzer] Implemented a base of detecing lifetimebound annotation (PR #200145)

via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 7 18:38:37 PDT 2026


================
@@ -3,25 +3,25 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=alpha.cplusplus.LifetimeAnnotations \
 // RUN:   -analyzer-config c++-container-inlining=false -verify %s
 
-void clang_analyzer_dump(...);
+struct A {};
 
-// These are the cases when the result of function calls are MemRegions.
+void clang_analyzer_lifetime_bound(int*);
+void clang_analyzer_lifetime_bound(int&);
+void clang_analyzer_lifetime_bound(A*);
+void clang_analyzer_lifetime_bound(A&);
 
-struct A {};
+// These are the cases when the result of function calls are MemRegions.
----------------
isuckatcs wrote:

Pointers and lvalue references only? What about rvalue references, forwarding references, etc.

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


More information about the cfe-commits mailing list