Skip to content

Commit 19c0a6b

Browse files
[Analysis] Migrate away from PointerUnion::dyn_cast (NFC) (#122652)
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 Ctx->FunArgs to be nonnull.
1 parent 8ed9968 commit 19c0a6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Analysis/ThreadSafetyCommon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ til::SExpr *SExprBuilder::translateDeclRefExpr(const DeclRefExpr *DRE,
336336
: (cast<ObjCMethodDecl>(D)->getCanonicalDecl() == Canonical)) {
337337
// Substitute call arguments for references to function parameters
338338
if (const Expr *const *FunArgs =
339-
Ctx->FunArgs.dyn_cast<const Expr *const *>()) {
339+
dyn_cast<const Expr *const *>(Ctx->FunArgs)) {
340340
assert(I < Ctx->NumArgs);
341341
return translate(FunArgs[I], Ctx->Prev);
342342
}

0 commit comments

Comments
 (0)