diff options
-rw-r--r-- | lib/Analysis/CallGraph.cpp | 3 | ||||
-rw-r--r-- | test/Analysis/misc-ps-cxx0x.cpp | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/Analysis/CallGraph.cpp b/lib/Analysis/CallGraph.cpp index eb3f3ef97a..01d6c41f91 100644 --- a/lib/Analysis/CallGraph.cpp +++ b/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) { diff --git a/test/Analysis/misc-ps-cxx0x.cpp b/test/Analysis/misc-ps-cxx0x.cpp index 53b6fa29ad..b4dee3122e 100644 --- a/test/Analysis/misc-ps-cxx0x.cpp +++ b/test/Analysis/misc-ps-cxx0x.cpp @@ -68,3 +68,8 @@ void test2() { *p = 0xDEADBEEF; // no-warning } +// Do not crash on the following when constructing the +// callgraph. +struct RDar11178609 { + ~RDar11178609() = delete; +}; |