Skip to content

Commit b9be245

Browse files
committed
Re-add accidentally removed code; fixes precommit CI test
1 parent f463154 commit b9be245

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/Sema/SemaExceptionSpec.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,8 @@ CanThrowResult Sema::canThrow(const Stmt *S) {
12111211
if (const RecordType *RT = DTy->getAs<RecordType>()) {
12121212
const CXXRecordDecl *RD = cast<CXXRecordDecl>(RT->getDecl());
12131213
const CXXDestructorDecl *DD = RD->getDestructor();
1214-
CT = mergeCanThrow(CT, canCalleeThrow(*this, DE, DD));
1214+
if (DD)
1215+
CT = mergeCanThrow(CT, canCalleeThrow(*this, DE, DD));
12151216
}
12161217
if (CT == CT_Can)
12171218
return CT;

0 commit comments

Comments
 (0)