@@ -1144,25 +1144,22 @@ void ExprEngine::ProcessStmt(const Stmt *currStmt, ExplodedNode *Pred) {
11441144 }
11451145
11461146 // Enqueue the new nodes onto the work list.
1147- Engine.enqueue (Dst, currBldrCtx->getBlock (), currStmtIdx);
1147+ Engine.enqueueStmtNodes (Dst, currBldrCtx->getBlock (), currStmtIdx);
11481148}
11491149
11501150void ExprEngine::ProcessLoopExit (const Stmt* S, ExplodedNode *Pred) {
11511151 PrettyStackTraceLoc CrashInfo (getContext ().getSourceManager (),
11521152 S->getBeginLoc (),
11531153 " Error evaluating end of the loop" );
1154- ExplodedNodeSet Dst;
1155- Dst.Add (Pred);
1156- NodeBuilder Bldr (Pred, Dst, *currBldrCtx);
11571154 ProgramStateRef NewState = Pred->getState ();
11581155
11591156 if (AMgr.options .ShouldUnrollLoops )
11601157 NewState = processLoopEnd (S, NewState);
11611158
11621159 LoopExit PP (S, Pred->getLocationContext ());
1163- Bldr. generateNode (PP, NewState, Pred);
1164- // Enqueue the new nodes onto the work list.
1165- Engine.enqueue (Dst , currBldrCtx->getBlock (), currStmtIdx);
1160+ ExplodedNode *N = Engine. makeNode (PP, NewState, Pred);
1161+ if (N && !N-> isSink ())
1162+ Engine.enqueueStmtNode (N , currBldrCtx->getBlock (), currStmtIdx);
11661163}
11671164
11681165void ExprEngine::ProcessInitializer (const CFGInitializer CFGInit,
@@ -1193,9 +1190,8 @@ void ExprEngine::ProcessInitializer(const CFGInitializer CFGInit,
11931190 // The field was directly constructed, so there is no need to bind.
11941191 // But we still need to stop tracking the object under construction.
11951192 State = finishObjectConstruction (State, BMI, LC);
1196- NodeBuilder Bldr (Pred, Tmp, *currBldrCtx);
11971193 PostStore PS (Init, LC, /* Loc*/ nullptr , /* tag*/ nullptr );
1198- Bldr. generateNode ( PS, State, Pred);
1194+ Tmp. Add (Engine. makeNode ( PS, State, Pred) );
11991195 } else {
12001196 const ValueDecl *Field;
12011197 if (BMI->isIndirectMemberInitializer ()) {
@@ -1247,15 +1243,12 @@ void ExprEngine::ProcessInitializer(const CFGInitializer CFGInit,
12471243 // Construct PostInitializer nodes whether the state changed or not,
12481244 // so that the diagnostics don't get confused.
12491245 PostInitializer PP (BMI, FieldLoc.getAsRegion (), stackFrame);
1250- ExplodedNodeSet Dst;
1251- NodeBuilder Bldr (Tmp, Dst, *currBldrCtx);
1252- for (const auto I : Tmp) {
1253- ProgramStateRef State = I->getState ();
1254- Bldr.generateNode (PP, State, I);
1255- }
12561246
1247+ ExplodedNodeSet Dst;
1248+ for (ExplodedNode *Pred : Tmp)
1249+ Dst.Add (Engine.makeNode (PP, Pred->getState (), Pred));
12571250 // Enqueue the new nodes onto the work list.
1258- Engine.enqueue (Dst, currBldrCtx->getBlock (), currStmtIdx);
1251+ Engine.enqueueStmtNodes (Dst, currBldrCtx->getBlock (), currStmtIdx);
12591252}
12601253
12611254std::pair<ProgramStateRef, uint64_t >
@@ -1319,7 +1312,7 @@ void ExprEngine::ProcessImplicitDtor(const CFGImplicitDtor D,
13191312 }
13201313
13211314 // Enqueue the new nodes onto the work list.
1322- Engine.enqueue (Dst, currBldrCtx->getBlock (), currStmtIdx);
1315+ Engine.enqueueStmtNodes (Dst, currBldrCtx->getBlock (), currStmtIdx);
13231316}
13241317
13251318void ExprEngine::ProcessNewAllocator (const CXXNewExpr *NE,
@@ -1333,13 +1326,12 @@ void ExprEngine::ProcessNewAllocator(const CXXNewExpr *NE,
13331326 if (Opts.MayInlineCXXAllocator )
13341327 VisitCXXNewAllocatorCall (NE, Pred, Dst);
13351328 else {
1336- NodeBuilder Bldr (Pred, Dst, *currBldrCtx);
13371329 const LocationContext *LCtx = Pred->getLocationContext ();
13381330 PostImplicitCall PP (NE->getOperatorNew (), NE->getBeginLoc (), LCtx,
13391331 getCFGElementRef ());
1340- Bldr. generateNode ( PP, Pred->getState (), Pred);
1332+ Dst. Add (Engine. makeNode ( PP, Pred->getState (), Pred) );
13411333 }
1342- Engine.enqueue (Dst, currBldrCtx->getBlock (), currStmtIdx);
1334+ Engine.enqueueStmtNodes (Dst, currBldrCtx->getBlock (), currStmtIdx);
13431335}
13441336
13451337void ExprEngine::ProcessAutomaticObjDtor (const CFGAutomaticObjDtor Dtor,
0 commit comments