[PATCH] D27674: [StaticAnalysis] Remove unnecessary parameter in CallGraphNode::addCallee.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 12 06:03:32 PST 2016
hokein created this revision.
hokein added a reviewer: bkramer.
hokein added subscribers: ioeric, cfe-commits.
Remove the CallGraph in addCallee as it is not used in addCallee.
It decouples addCallee from CallGraph, so that we can use CallGraphNode
within our customized CallGraph.
https://reviews.llvm.org/D27674
Files:
include/clang/Analysis/CallGraph.h
lib/Analysis/CallGraph.cpp
Index: lib/Analysis/CallGraph.cpp
===================================================================
--- lib/Analysis/CallGraph.cpp
+++ lib/Analysis/CallGraph.cpp
@@ -55,7 +55,7 @@
void addCalledDecl(Decl *D) {
if (G->includeInGraph(D)) {
CallGraphNode *CalleeNode = G->getOrInsertNode(D);
- CallerNode->addCallee(CalleeNode, G);
+ CallerNode->addCallee(CalleeNode);
}
}
@@ -154,7 +154,7 @@
Node = llvm::make_unique<CallGraphNode>(F);
// Make Root node a parent of all functions to make sure all are reachable.
if (F)
- Root->addCallee(Node.get(), this);
+ Root->addCallee(Node.get());
return Node.get();
}
Index: include/clang/Analysis/CallGraph.h
===================================================================
--- include/clang/Analysis/CallGraph.h
+++ include/clang/Analysis/CallGraph.h
@@ -157,7 +157,7 @@
inline bool empty() const {return CalledFunctions.empty(); }
inline unsigned size() const {return CalledFunctions.size(); }
- void addCallee(CallGraphNode *N, CallGraph *CG) {
+ void addCallee(CallGraphNode *N) {
CalledFunctions.push_back(N);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27674.81078.patch
Type: text/x-patch
Size: 1137 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161212/ef4ae689/attachment.bin>
More information about the cfe-commits
mailing list