diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-04-05 04:03:23 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-04-05 04:03:23 +0000 |
commit | 504957f413bcdfc3fea97cf98dcf6145736610f9 (patch) | |
tree | 1f0720ffe259b8c99cee52dd3aafe687c8695b7e /clang/lib/Analysis/CallGraph.cpp | |
parent | 3d00eecc53b3b06eead0c5372ac38b0706650a18 (diff) | |
download | bcm5719-llvm-504957f413bcdfc3fea97cf98dcf6145736610f9.tar.gz bcm5719-llvm-504957f413bcdfc3fea97cf98dcf6145736610f9.zip |
Do not crash in the callgraph construction when encountering deleted function definitions. Fixes <rdar://problem/11178609>.
llvm-svn: 154081
Diffstat (limited to 'clang/lib/Analysis/CallGraph.cpp')
-rw-r--r-- | clang/lib/Analysis/CallGraph.cpp | 3 |
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) { |