[clang] [LifetimeSafety] Add missing origins stats for lifetime analysis (PR #166568)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 26 00:34:17 PST 2025


================
@@ -88,4 +113,33 @@ OriginID OriginManager::getOrCreate(const ValueDecl &D) {
   return NewID;
 }
 
+const llvm::DenseMap<const clang::Expr *, OriginID> &
+OriginManager::getExprToOriginId() const {
+  return ExprToOriginID;
+}
----------------
usx95 wrote:

This is not used outside this .cpp file.  
Let us not introduce this and instead make the AST Visitor directly accept ExprToOriginID as one of its args

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


More information about the cfe-commits mailing list