Skip to content

Commit 35f9d2a

Browse files
[CodeGen] Migrate away from PointerUnion::dyn_cast (NFC) (#122778)
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 Prototype.P to be nonnull.
1 parent ffe5cdd commit 35f9d2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CodeGen/CGCall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4507,7 +4507,7 @@ void CodeGenFunction::EmitCallArgs(
45074507
// First, if a prototype was provided, use those argument types.
45084508
bool IsVariadic = false;
45094509
if (Prototype.P) {
4510-
const auto *MD = Prototype.P.dyn_cast<const ObjCMethodDecl *>();
4510+
const auto *MD = dyn_cast<const ObjCMethodDecl *>(Prototype.P);
45114511
if (MD) {
45124512
IsVariadic = MD->isVariadic();
45134513
ExplicitCC = getCallingConventionForDecl(

0 commit comments

Comments
 (0)