[clang] [NFC][analyzer] Simplify ExprEngine::Visit, eliminate NodeBuilders (PR #200837)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 1 07:37:23 PDT 2026


================
@@ -2110,64 +2073,31 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred,
       else
         VisitBinaryOperator(cast<BinaryOperator>(S), Pred, Dst);
 
-      Bldr.addNodes(Dst);
       break;
     }
 
-    case Stmt::CXXOperatorCallExprClass: {
-      const auto *OCE = cast<CXXOperatorCallExpr>(S);
-
-      // For instance method operators, make sure the 'this' argument has a
-      // valid region.
-      const Decl *Callee = OCE->getCalleeDecl();
-      if (const auto *MD = dyn_cast_or_null<CXXMethodDecl>(Callee)) {
-        if (MD->isImplicitObjectMemberFunction()) {
-          ProgramStateRef State = Pred->getState();
-          const StackFrame *SF = Pred->getStackFrame();
-          ProgramStateRef NewState =
-              createTemporaryRegionIfNeeded(State, SF, OCE->getArg(0));
-          if (NewState != State) {
-            Pred = Bldr.generateNode(OCE, Pred, NewState, /*tag=*/nullptr,
-                                     ProgramPoint::PreStmtKind);
-            // Did we cache out?
-            if (!Pred)
-              break;
-          }
-        }
-      }
-      [[fallthrough]];
----------------
NagyDonat wrote:

This logic was moved to `VisitCallExpr()`

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


More information about the cfe-commits mailing list