[all-commits] [llvm/llvm-project] a9bf16: [StaticAnalyzer] Migrate away from PointerUnion::{...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Tue Dec 3 13:53:44 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a9bf16d961e9bb0923b401bc26697c6ca707a1f5
      https://github.com/llvm/llvm-project/commit/a9bf16d961e9bb0923b401bc26697c6ca707a1f5
  Author: Kazu Hirata <kazu at google.com>
  Date:   2024-12-03 (Tue, 03 Dec 2024)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
    M clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp
    M clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
    M clang/lib/StaticAnalyzer/Core/MemRegion.cpp
    M clang/lib/StaticAnalyzer/Core/SVals.cpp

  Log Message:
  -----------
  [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (#118421)

Note that PointerUnion::{is,get} have 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>

I'm not touching PointerUnion::dyn_cast for now because it's a bit
complicated; we could blindly migrate it to dyn_cast_if_present, but
we should probably use dyn_cast when the operand is known to be
non-null.



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