summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CallGraph.cpp
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2017-01-27 12:14:56 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2017-01-27 12:14:56 +0000
commit12caf8e1e6759d8ced7dbd40ca1bd8efe9e7bbae (patch)
tree81d1f24772baf771d0eb02acb8cafa4c78f40602 /clang/lib/Analysis/CallGraph.cpp
parentca74dd79e9d9717eca44ecc0005f643d5fc102fc (diff)
downloadbcm5719-llvm-12caf8e1e6759d8ced7dbd40ca1bd8efe9e7bbae.tar.gz
bcm5719-llvm-12caf8e1e6759d8ced7dbd40ca1bd8efe9e7bbae.zip
[analyzer] Consider function call arguments while building CallGraph.
Function call can appear in the arguments of another function call, eg.: foo(bar()); This patch adds support for such cases. Patch by Ivan Sidorenko! Differential revision: https://reviews.llvm.org/D28905 llvm-svn: 293280
Diffstat (limited to 'clang/lib/Analysis/CallGraph.cpp')
-rw-r--r--clang/lib/Analysis/CallGraph.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Analysis/CallGraph.cpp b/clang/lib/Analysis/CallGraph.cpp
index 8c126b09d05..6d9530bf0c6 100644
--- a/clang/lib/Analysis/CallGraph.cpp
+++ b/clang/lib/Analysis/CallGraph.cpp
@@ -62,6 +62,7 @@ public:
void VisitCallExpr(CallExpr *CE) {
if (Decl *D = getDeclFromCall(CE))
addCalledDecl(D);
+ VisitChildren(CE);
}
// Adds may-call edges for the ObjC message sends.
OpenPOWER on IntegriCloud