[libclang] Migrate away from PointerUnion::dyn_cast (NFC) (#125381)
commit09e7b40bd3d7a1a2d9153912224bcf612954ead5
authorKazu Hirata <kazu@google.com>
Sun, 2 Feb 2025 17:31:39 +0000 (2 09:31 -0800)
committerGitHub <noreply@github.com>
Sun, 2 Feb 2025 17:31:39 +0000 (2 09:31 -0800)
tree6736f651e9461d5307447f7cc30d59335fb6df3e
parent2767f4bf0d5a70aa990dbfb3341a1bc03effcdbd
[libclang] Migrate away from PointerUnion::dyn_cast (NFC) (#125381)

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 Storage to be nonnull.
clang/tools/libclang/CIndex.cpp