================
@@ -2915,6 +2918,43 @@ class LifetimeSafetyReporterImpl : public 
LifetimeSafetyReporter {
 } // namespace
 } // namespace clang::lifetimes
 
+class CallGraphBuilder : public clang::RecursiveASTVisitor<CallGraphBuilder> {
----------------
usx95 wrote:

Maybe also try using the `CallGraph` ctor as well which uses `addToCallGraph`.
```cpp
CallGraph::CallGraph(Module &M)
    : M(M), ExternalCallingNode(getOrInsertFunction(nullptr)),
      CallsExternalNode(std::make_unique<CallGraphNode>(this, nullptr)) {
  // Add every interesting function to the call graph.
  for (Function &F : M)
    addToCallGraph(&F);
}
```
Maybe passing it `TU->getOwningModule()` would work.

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

Reply via email to