Author: Kazu Hirata Date: 2026-10-11T01:36:22-07:00 New Revision: 7bb8e30a7b5db32e3208b3dc22eade0ad40ee6e5
URL: https://github.com/llvm/llvm-project/commit/7bb8e30a7b5db32e3208b3dc22eade0ad40ee6e5 DIFF: https://github.com/llvm/llvm-project/commit/7bb8e30a7b5db32e3208b3dc22eade0ad40ee6e5.diff LOG: [clang] Replace PointerUnion::dyn_cast with llvm::dyn_cast (NFC) (#230911) PointerUnion::dyn_cast has been soft-deprecated in favor of llvm::dyn_cast and llvm::dyn_cast_if_present. This patch replaces the former with llvm::dyn_cast where the operand is guaranteed to be nonnull. Note that PlaceholderBase::ParamOrMethod is always initialized to a nonnull pointer in LoanManager::getOrCreatePlaceholderBase and never modified afterward. Assisted-by: Antigravity Added: Modified: clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h Removed: ################################################################################ diff --git a/clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h b/clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h index 00c931e4f9f66..5643f0fc87314 100644 --- a/clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h +++ b/clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h @@ -82,11 +82,11 @@ class PlaceholderBase : public llvm::FoldingSetNode { PlaceholderBase(const CXXMethodDecl *MD) : ParamOrMethod(MD) {} const ParmVarDecl *getParmVarDecl() const { - return ParamOrMethod.dyn_cast<const ParmVarDecl *>(); + return dyn_cast<const ParmVarDecl *>(ParamOrMethod); } const CXXMethodDecl *getImplicitThisParent() const { - return ParamOrMethod.dyn_cast<const CXXMethodDecl *>(); + return dyn_cast<const CXXMethodDecl *>(ParamOrMethod); } using KeyTy = llvm::PointerUnion<const ParmVarDecl *, const CXXMethodDecl *>; _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
