summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis
diff options
context:
space:
mode:
authorMatt Beaumont-Gay <matthewbg@google.com>2013-09-09 21:07:58 +0000
committerMatt Beaumont-Gay <matthewbg@google.com>2013-09-09 21:07:58 +0000
commit093f240a73f985026ec1e393a29ef5527a60bdde (patch)
tree8113da509619cce2ec636dd78dcf9c0feb6feb9f /clang/lib/Analysis
parent5ab555532b5aaee281bded6341e240d3bc6261df (diff)
downloadbcm5719-llvm-093f240a73f985026ec1e393a29ef5527a60bdde.tar.gz
bcm5719-llvm-093f240a73f985026ec1e393a29ef5527a60bdde.zip
Fix a crash introduced in r189828.
The predicates in CXXRecordDecl which test various properties of special members can't be called on incomplete decls. llvm-svn: 190353
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r--clang/lib/Analysis/CFG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp
index 191c324b3c6..c7fe9f3a886 100644
--- a/clang/lib/Analysis/CFG.cpp
+++ b/clang/lib/Analysis/CFG.cpp
@@ -3133,7 +3133,7 @@ CFGBlock *CFGBuilder::VisitCXXDeleteExpr(CXXDeleteExpr *DE,
DTy = DTy.getNonReferenceType();
CXXRecordDecl *RD = Context->getBaseElementType(DTy)->getAsCXXRecordDecl();
if (RD) {
- if (!RD->hasTrivialDestructor())
+ if (RD->isCompleteDefinition() && !RD->hasTrivialDestructor())
appendDeleteDtor(Block, RD, DE);
}
OpenPOWER on IntegriCloud