Author: Kazu Hirata Date: 2025-07-13T13:12:31-07:00 New Revision: 047552600bd9fac5a6ae63d6e4d44cc174cc3da6
URL: https://github.com/llvm/llvm-project/commit/047552600bd9fac5a6ae63d6e4d44cc174cc3da6 DIFF: https://github.com/llvm/llvm-project/commit/047552600bd9fac5a6ae63d6e4d44cc174cc3da6.diff LOG: [Sema] Remove an unnecessary cast (NFC) (#148531) Dtor is already of CXXDestructorDecl *. Added: Modified: clang/lib/Sema/SemaExprCXX.cpp Removed: ################################################################################ diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index 2ad0fd1a81a47..25afa2f4dfe7a 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -4096,8 +4096,7 @@ Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal, if (!PointeeRD->hasIrrelevantDestructor()) { if (CXXDestructorDecl *Dtor = LookupDestructor(PointeeRD)) { if (Dtor->isCalledByDelete(OperatorDelete)) { - MarkFunctionReferenced(StartLoc, - const_cast<CXXDestructorDecl *>(Dtor)); + MarkFunctionReferenced(StartLoc, Dtor); if (DiagnoseUseOfDecl(Dtor, StartLoc)) return ExprError(); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits