[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 2 23:17:22 PST 2024
================
@@ -196,13 +196,13 @@ const PointerToMemberData *BasicValueFactory::accumCXXBase(
const NamedDecl *ND = nullptr;
llvm::ImmutableList<const CXXBaseSpecifier *> BaseSpecList;
- if (PTMDT.isNull() || PTMDT.is<const NamedDecl *>()) {
- if (PTMDT.is<const NamedDecl *>())
- ND = PTMDT.get<const NamedDecl *>();
+ if (PTMDT.isNull() || isa<const NamedDecl *>(PTMDT)) {
+ if (isa<const NamedDecl *>(PTMDT))
----------------
steakhal wrote:
Probably a dyn_cast is more appropriate here.
https://github.com/llvm/llvm-project/pull/118421
More information about the cfe-commits
mailing list