Author: Kazu Hirata Date: 2026-10-28T00:59:23-07:00 New Revision: 97e2e66e680682f9fe3d7ee4d26c2f1a27127b78
URL: https://github.com/llvm/llvm-project/commit/97e2e66e680682f9fe3d7ee4d26c2f1a27127b78 DIFF: https://github.com/llvm/llvm-project/commit/97e2e66e680682f9fe3d7ee4d26c2f1a27127b78.diff LOG: [clang] Replace PointerUnion::dyn_cast with llvm::dyn_cast (NFC) (#236317) PointerUnion::dyn_cast has been soft-deprecated in favor of llvm::dyn_cast and llvm::dyn_cast_if_present. This patch replaces PointerUnion::dyn_cast with llvm::dyn_cast in MatcherContext::Query::get. Note that IRMatchers.h is only used by TBAAMetadataTest.cpp, where MatcherContext::Query::Entity is always initialized with nonnull pointers and never modified afterward. Assisted-by: Antigravity Added: Modified: clang/unittests/CodeGen/IRMatchers.h Removed: ################################################################################ diff --git a/clang/unittests/CodeGen/IRMatchers.h b/clang/unittests/CodeGen/IRMatchers.h index 3572a317f07ac4..afb12bac03e174 100644 --- a/clang/unittests/CodeGen/IRMatchers.h +++ b/clang/unittests/CodeGen/IRMatchers.h @@ -68,7 +68,7 @@ class MatcherContext { template<typename T> const T *get() const { - return Entity.dyn_cast<const T *>(); + return dyn_cast<const T *>(Entity); } unsigned getOperandNo() const { return OperandNo; } _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
