summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CallGraph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Analysis/CallGraph.cpp')
-rw-r--r--clang/lib/Analysis/CallGraph.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Analysis/CallGraph.cpp b/clang/lib/Analysis/CallGraph.cpp
index eb3f3ef97ac..01d6c41f91b 100644
--- a/clang/lib/Analysis/CallGraph.cpp
+++ b/clang/lib/Analysis/CallGraph.cpp
@@ -125,7 +125,8 @@ void CallGraph::addToCallGraph(Decl* D, bool IsGlobal) {
// Process all the calls by this function as well.
CGBuilder builder(this, D, Node);
- builder.Visit(D->getBody());
+ if (Stmt *Body = D->getBody())
+ builder.Visit(Body);
}
void CallGraph::addToCallGraph(TranslationUnitDecl *TU) {
OpenPOWER on IntegriCloud