Skip to content

Commit 0475526

Browse files
[Sema] Remove an unnecessary cast (NFC) (#148531)
Dtor is already of CXXDestructorDecl *.
1 parent f4c7cc2 commit 0475526

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/Sema/SemaExprCXX.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4096,8 +4096,7 @@ Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal,
40964096
if (!PointeeRD->hasIrrelevantDestructor()) {
40974097
if (CXXDestructorDecl *Dtor = LookupDestructor(PointeeRD)) {
40984098
if (Dtor->isCalledByDelete(OperatorDelete)) {
4099-
MarkFunctionReferenced(StartLoc,
4100-
const_cast<CXXDestructorDecl *>(Dtor));
4099+
MarkFunctionReferenced(StartLoc, Dtor);
41014100
if (DiagnoseUseOfDecl(Dtor, StartLoc))
41024101
return ExprError();
41034102
}

0 commit comments

Comments
 (0)