[llvm-branch-commits] [clang] [LifetimeSafety] Implement support for lifetimebound attribute (PR #158489)

Utkarsh Saxena via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Sep 23 08:06:28 PDT 2025


================
@@ -508,7 +545,7 @@ class FactGenerator : public ConstStmtVisitor<FactGenerator> {
       return;
     // An ImplicitCastExpr node itself gets an origin, which flows from the
     // origin of its sub-expression (after stripping its own parens/casts).
-    addAssignOriginFact(*ICE, *ICE->getSubExpr());
+    addOriginFlowFact(*ICE, *ICE->getSubExpr());
----------------
usx95 wrote:

Ideally yes. But I was piggy bagging on inherent monotonic nature of dataflow lattice. 
But it is better to be explicit. Tried to fit this by allowing OriginFlowFact to kill destination optionally and not to bloat the number of facts with many kill facts.

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


More information about the llvm-branch-commits mailing list