diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-07-17 07:36:20 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-07-17 07:36:20 +0000 |
commit | 3436f58e40bb92a4dae81355798f1273b2159e2a (patch) | |
tree | fab4ecf3d8c1c7c6cff77fdbec2d24d0027c7ab2 /clang/lib/Analysis/CallGraph.cpp | |
parent | fab6cbe6cdf29d198d6d866f4469224fc46982da (diff) | |
download | bcm5719-llvm-3436f58e40bb92a4dae81355798f1273b2159e2a.tar.gz bcm5719-llvm-3436f58e40bb92a4dae81355798f1273b2159e2a.zip |
As suggested by Argyrios, revert r76159 and make "FindImmediateParent"
a public static method of ASTLocation.
llvm-svn: 76166
Diffstat (limited to 'clang/lib/Analysis/CallGraph.cpp')
-rw-r--r-- | clang/lib/Analysis/CallGraph.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Analysis/CallGraph.cpp b/clang/lib/Analysis/CallGraph.cpp index d49e8ec11be..2ec6d2014d8 100644 --- a/clang/lib/Analysis/CallGraph.cpp +++ b/clang/lib/Analysis/CallGraph.cpp @@ -69,7 +69,10 @@ void CGBuilder::VisitCallExpr(CallExpr *CE) { if (FunctionDecl *CalleeDecl = CE->getDirectCallee()) { Entity *Ent = Entity::get(CalleeDecl, G.getProgram()); CallGraphNode *CalleeNode = G.getOrInsertFunction(Ent); - CallerNode->addCallee(ASTLocation(FD, CE), CalleeNode); + + Decl *Parent = ASTLocation::FindImmediateParent(FD, CE); + + CallerNode->addCallee(ASTLocation(Parent, CE), CalleeNode); } } |