[clang] [Analyzer][NFC] Remove redundant function call (PR #75076)

via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 11 10:31:11 PST 2023


================
@@ -2565,21 +2565,20 @@ class PRValueHandler final : public ExpressionHandler {
   using ExpressionHandler::ExpressionHandler;
 
   Tracker::Result handle(const Expr *E, const ExplodedNode *InputNode,
-                         const ExplodedNode *ExprNode,
+                         const ExplodedNode *RVNode,
                          TrackingOptions Opts) override {
-    if (!E->isPRValue())
-      return {};
+    assert(RVNode->getStmtForDiagnostics() == E &&
----------------
isuckatcs wrote:

Actually, this will crash if `RVNode` is a `nullptr`, which is only checked afterwards.

https://github.com/llvm/llvm-project/pull/75076


More information about the cfe-commits mailing list