[cfe-commits] r154081 - in /cfe/trunk: lib/Analysis/CallGraph.cpp test/Analysis/misc-ps-cxx0x.cpp
Ted Kremenek
kremenek at apple.com
Wed Apr 4 21:03:23 PDT 2012
Author: kremenek
Date: Wed Apr 4 23:03:23 2012
New Revision: 154081
URL: http://llvm.org/viewvc/llvm-project?rev=154081&view=rev
Log:
Do not crash in the callgraph construction when encountering deleted function definitions. Fixes <rdar://problem/11178609>.
Modified:
cfe/trunk/lib/Analysis/CallGraph.cpp
cfe/trunk/test/Analysis/misc-ps-cxx0x.cpp
Modified: cfe/trunk/lib/Analysis/CallGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CallGraph.cpp?rev=154081&r1=154080&r2=154081&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CallGraph.cpp (original)
+++ cfe/trunk/lib/Analysis/CallGraph.cpp Wed Apr 4 23:03:23 2012
@@ -125,7 +125,8 @@
// 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) {
Modified: cfe/trunk/test/Analysis/misc-ps-cxx0x.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/misc-ps-cxx0x.cpp?rev=154081&r1=154080&r2=154081&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/misc-ps-cxx0x.cpp (original)
+++ cfe/trunk/test/Analysis/misc-ps-cxx0x.cpp Wed Apr 4 23:03:23 2012
@@ -68,3 +68,8 @@
*p = 0xDEADBEEF; // no-warning
}
+// Do not crash on the following when constructing the
+// callgraph.
+struct RDar11178609 {
+ ~RDar11178609() = delete;
+};
More information about the cfe-commits
mailing list