[clang] Replace PointerUnion::dyn_cast with llvm::dyn_cast (NFC) (#235396)
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 at 7 call sites across 3
files under clang/lib/AST/.
All tests in check-clang pass with these changes, and LLM-based static
analysis of the surrounding data structures and call sites confirms that
the PointerUnion operand at each site is nonnull either by construction
or because callers ensure it is nonnull before reaching llvm::dyn_cast.
Assisted-by: Antigravity