Skip to content

Commit cd4e360

Browse files
[CodeGen] Migrate away from PointerUnion::dyn_cast (NFC) (#125456)
Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with // isa<T>, cast<T> and the llvm::dyn_cast<T> Literal migration would result in dyn_cast_if_present (see the definition of PointerUnion::dyn_cast), but this patch uses dyn_cast because we expect E to be nonnull.
1 parent dfc2873 commit cd4e360

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/CodeGen/ItaniumCXXABI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2239,8 +2239,8 @@ CGCallee ItaniumCXXABI::getVirtualFunctionPointer(CodeGenFunction &CGF,
22392239
llvm::Value *ItaniumCXXABI::EmitVirtualDestructorCall(
22402240
CodeGenFunction &CGF, const CXXDestructorDecl *Dtor, CXXDtorType DtorType,
22412241
Address This, DeleteOrMemberCallExpr E, llvm::CallBase **CallOrInvoke) {
2242-
auto *CE = E.dyn_cast<const CXXMemberCallExpr *>();
2243-
auto *D = E.dyn_cast<const CXXDeleteExpr *>();
2242+
auto *CE = dyn_cast<const CXXMemberCallExpr *>(E);
2243+
auto *D = dyn_cast<const CXXDeleteExpr *>(E);
22442244
assert((CE != nullptr) ^ (D != nullptr));
22452245
assert(CE == nullptr || CE->arg_begin() == CE->arg_end());
22462246
assert(DtorType == Dtor_Deleting || DtorType == Dtor_Complete);

0 commit comments

Comments
 (0)