================
@@ -68,11 +70,22 @@ void LifetimeSafetyAnalysis::run() {
 
   runLifetimeChecker(*LoanPropagation, *LiveOrigins, FactMgr, AC, Reporter);
 }
+
+void collectLifetimeStats(AnalysisDeclContext &AC, OriginManager &OM,
+                          LifetimeSafetyStats &Stats) {
+  if (!AC.getBody())
+    return;
+  Stmt *FunctionBody = AC.getBody();
----------------
Xazax-hun wrote:

Nit: You could hoist this to before the early return and check `FunctionBody` 
for nullness.

https://github.com/llvm/llvm-project/pull/166568
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to