https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146706
N is already of ExplodedNode *. >From 698813a9dc8d286913f302c5fc498144d2406bc1 Mon Sep 17 00:00:00 2001 From: Kazu Hirata <k...@google.com> Date: Tue, 1 Jul 2025 20:55:55 -0700 Subject: [PATCH] [StaticAnalyzer] Remove unnecessary casts (NFC) N is already of ExplodedNode *. --- .../clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h index e995151927c96..bd11e0d40cfa9 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h @@ -448,14 +448,15 @@ class ExplodedNodeSet { public: ExplodedNodeSet(ExplodedNode *N) { - assert(N && !static_cast<ExplodedNode*>(N)->isSink()); + assert(N && !N->isSink()); Impl.insert(N); } ExplodedNodeSet() = default; void Add(ExplodedNode *N) { - if (N && !static_cast<ExplodedNode*>(N)->isSink()) Impl.insert(N); + if (N && !N->isSink()) + Impl.insert(N); } using iterator = ImplTy::iterator; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits