[all-commits] [llvm/llvm-project] 986581: [AST] Migrate away from PointerUnion::dyn_cast (NF...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Tue Jan 28 10:56:31 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 986581f6bcef8736c942a9fec9cf12bfbc57c1f6
      https://github.com/llvm/llvm-project/commit/986581f6bcef8736c942a9fec9cf12bfbc57c1f6
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-01-28 (Tue, 28 Jan 2025)

  Changed paths:
    M clang/include/clang/AST/DeclTemplate.h
    M clang/lib/AST/DeclTemplate.cpp

  Log Message:
  -----------
  [AST] Migrate away from PointerUnion::dyn_cast (NFC) (#124674)

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>

This patch migrates uses of PointerUnion::dyn_cast to
dyn_cast_if_present (see the definition of PointerUnion::dyn_cast).
Note that we already have dyn_cast_if_present<T*>(ExplicitInfo)
elsewhere in ClassTemplateSpecializationDecl and
VarTemplateSpecializationDecl, meaning that ExplicitInfo is not
guaranteed to be nonnull in those classes.



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