================ @@ -222,14 +144,14 @@ void DebugUseAfterLifetimeEnd::analyzerDumpLifetimeOriginsOf( } SVal ArgSVal = Call.getArgSVal(0); - const LifetimeSourceSet *SourceSet = State->get<LifetimeBoundMap>(ArgSVal); + auto SourceSet = lifetimemodeling::getLifetimeSourceSet(State, ArgSVal); ---------------- benedekaibas wrote:
That is a possible approach, but since the `analyzerDumpLifetimeOriginsOf` is the core functionality of the debug checker that would mean even if I move just the function itself into the modeling checker that the core logic of the debug checker lives in the modeling checker. I am wondering if that is something I should avoid doing? Another option that I think can solve this problem is just declaring a function only for the `analyzerDumpLifetimeOriginsOf` in the header. Something like: ```cpp std::vector<const MemRegion *> debugLifetimeSourceSet(ProgramStateRef State, SVal Val); ``` But this approach means that I would create this function only to get called once in the `analyzerDumpLifetimeOriginsOf`, so it has its trade off as well. It might be a cleaner approach to just move the `analyzerDumpLifetimeOriginsOf` to the modeling checker and add comment to it? https://github.com/llvm/llvm-project/pull/205951 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
