[all-commits] [llvm/llvm-project] 1fba18: [libclang] Migrate away from PointerUnion::dyn_cas...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Tue Feb 4 09:09:45 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1fba1860984f4757d04922df63d5cc3d3dcf07be
      https://github.com/llvm/llvm-project/commit/1fba1860984f4757d04922df63d5cc3d3dcf07be
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-02-04 (Tue, 04 Feb 2025)

  Changed paths:
    M clang/tools/libclang/CIndex.cpp

  Log Message:
  -----------
  [libclang] Migrate away from PointerUnion::dyn_cast (NFC) (#125631)

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.  Note that if Storage were
null, dereferencing Ovl would trigger a segfault.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list