[AST] Migrate away from PointerUnion::dyn_cast (NFC) (#125335)
commit657dc6d05e8e20d5c3b41161ace7fba5d2cb6e26
authorKazu Hirata <kazu@google.com>
Sat, 1 Feb 2025 16:13:20 +0000 (1 08:13 -0800)
committerGitHub <noreply@github.com>
Sat, 1 Feb 2025 16:13:20 +0000 (1 08:13 -0800)
tree261ca7e25e11afac96a30de96426e36514863972
parent16d4453f2f5d9554ce39507fda0f33ce9066007b
[AST] Migrate away from PointerUnion::dyn_cast (NFC) (#125335)

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 InVectors.front() and P to be nonnull.
clang/lib/AST/TemplateName.cpp