================
@@ -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();
+ OM.collectMissingOrigins(FunctionBody, Stats);
----------------
Xazax-hun wrote:
I see a null check in `collectMissingOrigins` and here as well. I think it is
better to make `collectMissingOrigins` take a reference and only do the null
check here at the caller (and eliminate the one in `collectMissingOrigins`.
https://github.com/llvm/llvm-project/pull/166568
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits