diff options
Diffstat (limited to 'lib/Analysis/CFG.cpp')
-rw-r--r-- | lib/Analysis/CFG.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp index c433639ec1..fc50071a32 100644 --- a/lib/Analysis/CFG.cpp +++ b/lib/Analysis/CFG.cpp @@ -2782,9 +2782,10 @@ const CXXDestructorDecl *CFGImplicitDtor::getDestructorDecl() const { case CFGElement::AutomaticObjectDtor: { const VarDecl *var = cast<CFGAutomaticObjDtor>(this)->getVarDecl(); QualType ty = var->getType(); + ty = ty.getNonReferenceType(); const RecordType *recordType = ty->getAs<RecordType>(); const CXXRecordDecl *classDecl = - cast<CXXRecordDecl>(recordType->getDecl()); + cast<CXXRecordDecl>(recordType->getDecl()); return classDecl->getDestructor(); } case CFGElement::TemporaryDtor: { @@ -2799,7 +2800,7 @@ const CXXDestructorDecl *CFGImplicitDtor::getDestructorDecl() const { // Not yet supported. return 0; } - assert(0 && "getKind() returned bogus value"); + llvm_unreachable("getKind() returned bogus value"); return 0; } |