================
@@ -2565,21 +2565,24 @@ 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 {};
 
-    const ExplodedNode *RVNode = findNodeForExpression(ExprNode, E);
     if (!RVNode)
       return {};
 
+    assert(RVNode->getStmtForDiagnostics() == E &&
+           "RVNode must be the ExplodedNode for the tracked expression.");
+
+    if (!E->isPRValue())
----------------
isuckatcs wrote:

This should still go first. If `E` is not a `PRValue`, this handler should not 
act on it at all.

https://github.com/llvm/llvm-project/pull/75076
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to