[clang] [clang] Trigger checkLifetimeEnd callback from CFGLifetimeEnds element (PR #201123)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 2 07:43:42 PDT 2026
================
@@ -725,6 +728,29 @@ class LoopExit : public ProgramPoint {
}
};
+/// Represents a point when the lifetime ends of any automatic object.
+class LifetimeEnd : public ProgramPoint {
+public:
+ LifetimeEnd(const Stmt *S, const VarDecl *D, const StackFrame *SF)
+ : ProgramPoint(S, D, LifetimeEndKind, SF) {}
+
+ LLVM_ATTRIBUTE_RETURNS_NONNULL const Stmt *getTriggerStmt() const {
+ return static_cast<const Stmt *>(getData1());
+ }
+
+ /// Returns a variable declaration that uniquely identifies the scope
----------------
Xazax-hun wrote:
```suggestion
/// Returns a variable declaration that uniquely identifies the scope.
```
https://github.com/llvm/llvm-project/pull/201123
More information about the cfe-commits
mailing list