[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:16 PST 2025


================
@@ -34,6 +38,12 @@ enum class Confidence : uint8_t {
   Definite // Reported as a definite error (-Wlifetime-safety-permissive)
 };
 
+/// A structure to hold the statistics related to LifetimeAnalysis.
+/// Curently it holds only the missing origin details.
+struct LifetimeSafetyStats {
+  llvm::StringMap<unsigned> MissingOriginCount;
----------------
usx95 wrote:

Can you add comment about this.

Example: Tracks expressions and their counts that do not get associated to an Origin after the end of the analysis.

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


More information about the cfe-commits mailing list