Lines Matching refs:Pred
288 void ExprEngine::processCFGElement(const CFGElement E, ExplodedNode *Pred,
290 PrettyStackTraceLocationContext CrashInfo(Pred->getLocationContext());
296 ProcessStmt(const_cast<Stmt*>(E.castAs<CFGStmt>().getStmt()), Pred);
299 ProcessInitializer(E.castAs<CFGInitializer>().getInitializer(), Pred);
303 Pred);
310 ProcessImplicitDtor(E.castAs<CFGImplicitDtor>(), Pred);
317 const ExplodedNode *Pred,
325 if (Pred->getLocation().getAs<BlockEntrance>())
342 void ExprEngine::removeDead(ExplodedNode *Pred, ExplodedNodeSet &Out,
358 ProgramStateRef CleanedState = Pred->getState();
386 StmtNodeBuilder Bldr(Pred, Out, *currBldrCtx);
387 Bldr.generateNode(DiagnosticStmt, Pred, CleanedState, &cleanupTag, K);
393 getCheckerManager().runCheckersForDeadSymbols(CheckedSet, Pred, SymReaper,
408 assert(StateMgr.haveEqualEnvironments(CheckerState, Pred->getState()) &&
411 assert(StateMgr.haveEqualStores(CheckerState, Pred->getState()) &&
425 ExplodedNode *Pred) {
436 if (shouldRemoveDeadBindings(AMgr, S, Pred, Pred->getLocationContext())){
437 removeDead(Pred, CleanedStates, currStmt, Pred->getLocationContext());
439 CleanedStates.Add(Pred);
456 ExplodedNode *Pred) {
465 cast<StackFrameContext>(Pred->getLocationContext());
469 ProgramStateRef State = Pred->getState();
472 ExplodedNodeSet Tmp(Pred);
518 assert(*Tmp.begin() == Pred && "have not generated any new nodes yet");
522 evalBind(Tmp, Init, Pred, FieldLoc, InitVal, /*isInit=*/true, &PP);
544 ExplodedNode *Pred) {
548 ProcessAutomaticObjDtor(D.castAs<CFGAutomaticObjDtor>(), Pred, Dst);
551 ProcessBaseDtor(D.castAs<CFGBaseDtor>(), Pred, Dst);
554 ProcessMemberDtor(D.castAs<CFGMemberDtor>(), Pred, Dst);
557 ProcessTemporaryDtor(D.castAs<CFGTemporaryDtor>(), Pred, Dst);
560 ProcessDeleteDtor(D.castAs<CFGDeleteDtor>(), Pred, Dst);
571 ExplodedNode *Pred) {
579 VisitCXXNewAllocatorCall(NE, Pred, Dst);
581 NodeBuilder Bldr(Pred, Dst, *currBldrCtx);
582 const LocationContext *LCtx = Pred->getLocationContext();
584 Bldr.generateNode(PP, Pred->getState(), Pred);
590 ExplodedNode *Pred,
595 ProgramStateRef state = Pred->getState();
596 SVal dest = state->getLValue(varDecl, Pred->getLocationContext());
605 Pred, Dst);
609 ExplodedNode *Pred,
611 ProgramStateRef State = Pred->getState();
612 const LocationContext *LCtx = Pred->getLocationContext();
626 NodeBuilder Bldr(Pred, Dst, *currBldrCtx);
627 Bldr.generateNode(PP, Pred->getState(), Pred);
634 Pred, Dst);
638 ExplodedNode *Pred, ExplodedNodeSet &Dst) {
639 const LocationContext *LCtx = Pred->getLocationContext();
644 SVal ThisVal = Pred->getState()->getSVal(ThisPtr);
653 CurDtor->getBody(), /*IsBase=*/ true, Pred, Dst);
657 ExplodedNode *Pred, ExplodedNodeSet &Dst) {
659 ProgramStateRef State = Pred->getState();
660 const LocationContext *LCtx = Pred->getLocationContext();
670 CurDtor->getBody(), /*IsBase=*/false, Pred, Dst);
674 ExplodedNode *Pred,
677 StmtNodeBuilder StmtBldr(Pred, CleanDtorState, *currBldrCtx);
678 ProgramStateRef State = Pred->getState();
680 std::make_pair(D.getBindTemporaryExpr(), Pred->getStackFrame()))) {
684 std::make_pair(D.getBindTemporaryExpr(), Pred->getStackFrame()));
686 StmtBldr.generateNode(D.getBindTemporaryExpr(), Pred, State);
693 CleanDtorState.empty() ? Pred : *CleanDtorState.begin();
702 ExplodedNode *Pred,
706 BranchNodeBuilder TempDtorBuilder(Pred, Dst, BldCtx, DstT, DstF);
707 if (Pred->getState()->contains<InitializedTemporariesSet>(
708 std::make_pair(BTE, Pred->getStackFrame()))) {
710 TempDtorBuilder.generateNode(Pred->getState(), true, Pred);
713 TempDtorBuilder.generateNode(Pred->getState(), false, Pred);
743 void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred,
749 StmtNodeBuilder Bldr(Pred, DstTop, *currBldrCtx);
782 const ExplodedNode *node = Bldr.generateSink(S, Pred, Pred->getState());
847 ProgramStateRef state = Pred->getState();
848 state = state->BindExpr(S, Pred->getLocationContext(),
850 Bldr.generateNode(S, Pred, state);
855 Bldr.takeNodes(Pred);
856 VisitObjCAtSynchronizedStmt(cast<ObjCAtSynchronizedStmt>(S), Pred, Dst);
865 Bldr.takeNodes(Pred);
867 getCheckerManager().runCheckersForPreStmt(PreVisit, Pred, S, *this);
919 Bldr.takeNodes(Pred);
921 getCheckerManager().runCheckersForPreStmt(preVisit, Pred, S, *this);
929 Bldr.takeNodes(Pred);
931 getCheckerManager().runCheckersForPreStmt(PreVisit, Pred, S, *this);
955 const LocationContext *LCtx = Pred->getLocationContext();
977 Bldr.takeNodes(Pred);
980 getCheckerManager().runCheckersForPreStmt(preVisit, Pred, S, *this);
1005 Bldr.takeNodes(Pred);
1006 VisitLvalArraySubscriptExpr(cast<ArraySubscriptExpr>(S), Pred, Dst);
1011 Bldr.takeNodes(Pred);
1012 VisitGCCAsmStmt(cast<GCCAsmStmt>(S), Pred, Dst);
1017 Bldr.takeNodes(Pred);
1018 VisitMSAsmStmt(cast<MSAsmStmt>(S), Pred, Dst);
1023 Bldr.takeNodes(Pred);
1024 VisitBlockExpr(cast<BlockExpr>(S), Pred, Dst);
1030 Bldr.takeNodes(Pred);
1031 VisitLambdaExpr(cast<LambdaExpr>(S), Pred, Dst);
1034 const ExplodedNode *node = Bldr.generateSink(S, Pred, Pred->getState());
1042 Bldr.takeNodes(Pred);
1043 VisitLogicalExpr(B, Pred, Dst);
1048 ProgramStateRef state = Pred->getState();
1049 Bldr.generateNode(B, Pred,
1050 state->BindExpr(B, Pred->getLocationContext(),
1052 Pred->getLocationContext())));
1056 Bldr.takeNodes(Pred);
1061 VisitBinaryOperator(cast<BinaryOperator>(S), Pred, Tmp);
1065 VisitBinaryOperator(cast<BinaryOperator>(S), Pred, Dst);
1079 ProgramStateRef State = Pred->getState();
1080 const LocationContext *LCtx = Pred->getLocationContext();
1084 Pred = Bldr.generateNode(OCE, Pred, NewState, /*Tag=*/nullptr,
1087 if (!Pred)
1097 Bldr.takeNodes(Pred);
1098 VisitCallExpr(cast<CallExpr>(S), Pred, Dst);
1104 Bldr.takeNodes(Pred);
1105 VisitCXXCatchStmt(cast<CXXCatchStmt>(S), Pred, Dst);
1112 Bldr.takeNodes(Pred);
1113 VisitCXXConstructExpr(cast<CXXConstructExpr>(S), Pred, Dst);
1119 Bldr.takeNodes(Pred);
1121 VisitCXXNewExpr(cast<CXXNewExpr>(S), Pred, PostVisit);
1128 Bldr.takeNodes(Pred);
1131 getCheckerManager().runCheckersForPreStmt(PreVisit, Pred, S, *this);
1144 Bldr.takeNodes(Pred);
1146 VisitGuardedExpr(C, C->getLHS(), C->getRHS(), Pred, Dst);
1152 Bldr.takeNodes(Pred);
1153 VisitBinaryOperator(cast<BinaryOperator>(S), Pred, Dst);
1158 Bldr.takeNodes(Pred);
1159 VisitCompoundLiteralExpr(cast<CompoundLiteralExpr>(S), Pred, Dst);
1165 Bldr.takeNodes(Pred);
1168 VisitGuardedExpr(C, C->getTrueExpr(), C->getFalseExpr(), Pred, Dst);
1174 Bldr.takeNodes(Pred);
1175 VisitCXXThisExpr(cast<CXXThisExpr>(S), Pred, Dst);
1180 Bldr.takeNodes(Pred);
1182 VisitCommonDeclRefExpr(DE, DE->getDecl(), Pred, Dst);
1188 Bldr.takeNodes(Pred);
1189 VisitDeclStmt(cast<DeclStmt>(S), Pred, Dst);
1201 Bldr.takeNodes(Pred);
1205 getCheckerManager().runCheckersForPreStmt(dstPrevisit, Pred, C, *this);
1221 Bldr.takeNodes(Pred);
1223 CreateCXXTemporaryObject(MTE, Pred, Dst);
1229 Bldr.takeNodes(Pred);
1230 VisitInitListExpr(cast<InitListExpr>(S), Pred, Dst);
1235 Bldr.takeNodes(Pred);
1236 VisitMemberExpr(cast<MemberExpr>(S), Pred, Dst);
1241 Bldr.takeNodes(Pred);
1242 VisitLvalObjCIvarRefExpr(cast<ObjCIvarRefExpr>(S), Pred, Dst);
1247 Bldr.takeNodes(Pred);
1248 VisitObjCForCollectionStmt(cast<ObjCForCollectionStmt>(S), Pred, Dst);
1253 Bldr.takeNodes(Pred);
1254 VisitObjCMessage(cast<ObjCMessageExpr>(S), Pred, Dst);
1262 Bldr.generateSink(S, Pred, Pred->getState());
1266 Bldr.takeNodes(Pred);
1267 VisitReturnStmt(cast<ReturnStmt>(S), Pred, Dst);
1272 Bldr.takeNodes(Pred);
1273 VisitOffsetOfExpr(cast<OffsetOfExpr>(S), Pred, Dst);
1278 Bldr.takeNodes(Pred);
1280 Pred, Dst);
1295 ProgramStateRef state = Pred->getState();
1296 Bldr.generateNode(SE, Pred,
1297 state->BindExpr(SE, Pred->getLocationContext(),
1299 Pred->getLocationContext())));
1305 Bldr.takeNodes(Pred);
1309 VisitUnaryOperator(U, Pred, Tmp);
1313 VisitUnaryOperator(U, Pred, Dst);
1319 Bldr.takeNodes(Pred);
1320 ProgramStateRef state = Pred->getState();
1323 SVal V = state->getSVal(Result, Pred->getLocationContext());
1324 Bldr.generateNode(S, Pred,
1325 state->BindExpr(S, Pred->getLocationContext(), V));
1328 Bldr.generateNode(S, Pred,
1329 state->BindExpr(S, Pred->getLocationContext(),
1404 ExplodedNode *Pred) {
1405 PrettyStackTraceLocationContext CrashInfo(Pred->getLocationContext());
1417 const LocationContext *LCtx = Pred->getLocationContext();
1419 getWidenedLoopState(Pred->getState(), LCtx, BlockCount, Term);
1420 nodeBuilder.generateNode(WidenedState, Pred);
1428 nodeBuilder.generateSink(Pred->getState(), Pred, &tag);
1432 const LocationContext *CalleeLC = Pred->getLocation().getLocationContext();
1444 replayWithoutInlining(Pred, CalleeLC)))
1564 ExplodedNode *Pred,
1570 const LocationContext *LCtx = Pred->getLocationContext();
1576 BranchNodeBuilder NullCondBldr(Pred, Dst, BldCtx, DstT, DstF);
1578 NullCondBldr.generateNode(Pred->getState(), true, Pred);
1592 Pred, *this);
1666 ExplodedNode *Pred,
1670 PrettyStackTraceLocationContext CrashInfo(Pred->getLocationContext());
1674 ProgramStateRef state = Pred->getState();
1676 BranchNodeBuilder builder(Pred, Dst, BuilderCtx, DstT, DstF);
1682 builder.generateNode(state, initHasRun, Pred);
1733 static bool stackFrameDoesNotContainInitializedTemporaries(ExplodedNode &Pred) {
1734 const StackFrameContext* Frame = Pred.getStackFrame();
1736 Pred.getState()->get<InitializedTemporariesSet>();
1751 ExplodedNode *Pred) {
1752 // FIXME: Assert that stackFrameDoesNotContainInitializedTemporaries(*Pred)).
1755 PrettyStackTraceLocationContext CrashInfo(Pred->getLocationContext());
1756 StateMgr.EndPath(Pred->getState());
1759 if (Pred->getLocationContext()->inTopFrame()) {
1762 removeDeadOnEndOfFunction(BC, Pred, AfterRemovedDead);
1770 getCheckerManager().runCheckersForEndFunction(BC, Dst, Pred, *this);
1861 ExplodedNode *Pred,
1863 StmtNodeBuilder Bldr(Pred, Dst, *currBldrCtx);
1865 ProgramStateRef state = Pred->getState();
1866 const LocationContext *LCtx = Pred->getLocationContext();
1872 const LocationContext *LocCtxt = Pred->getLocationContext();
1914 Bldr.generateNode(Ex, Pred, state->BindExpr(Ex, LCtx, V), nullptr,
1921 Bldr.generateNode(Ex, Pred, state->BindExpr(Ex, LCtx, V));
1926 Bldr.generateNode(Ex, Pred, state->BindExpr(Ex, LCtx, V), nullptr,
1937 Bldr.generateNode(Ex, Pred, state->BindExpr(Ex, LCtx, V), nullptr,
1947 ExplodedNode *Pred,
1954 getCheckerManager().runCheckersForPreStmt(checkerPreStmt, Pred, A, *this);
1974 void ExprEngine::VisitMemberExpr(const MemberExpr *M, ExplodedNode *Pred,
1979 getCheckerManager().runCheckersForPreStmt(CheckedSet, Pred, M, *this);
1990 VisitCommonDeclRefExpr(M, Member, Pred, EvalSet);
2167 ExplodedNode *Pred,
2171 const LocationContext *LC = Pred->getLocationContext();
2178 getCheckerManager().runCheckersForBind(CheckedSet, Pred, location, Val,
2188 ProgramStateRef state = Pred->getState();
2190 Bldr.generateNode(L, state, Pred);
2228 ExplodedNode *Pred,
2237 evalLocation(Tmp, AssignE, LocationE, Pred, state, location, tag, false);
2252 ExplodedNode *Pred,
2271 evalLoadCommon(Tmp, NodeEx, BoundEx, Pred, state,
2285 evalLoadCommon(Dst, NodeEx, BoundEx, Pred, state, location, tag, LoadTy);
2291 ExplodedNode *Pred,
2300 evalLocation(Tmp, NodeEx, BoundEx, Pred, state, location, tag, true);
2328 ExplodedNode *Pred,
2333 StmtNodeBuilder BldrTop(Pred, Dst, *currBldrCtx);
2340 BldrTop.takeNodes(Pred);
2341 StmtNodeBuilder Bldr(Pred, Src, *currBldrCtx);
2342 if (Pred->getState() != state) {
2353 Bldr.generateNode(NodeEx, Pred, state, &tag);
2378 ExplodedNode *Pred = *I;
2382 ProgramPoint P = Pred->getLocation();
2387 ProgramStateRef state = Pred->getState();
2388 SVal V = state->getSVal(Ex, Pred->getLocationContext());
2400 StateTrue = StateTrue->BindExpr(Ex, Pred->getLocationContext(), Val);
2401 Bldr.generateNode(Ex, Pred, StateTrue, tags.first);
2407 StateFalse = StateFalse->BindExpr(Ex, Pred->getLocationContext(), Val);
2408 Bldr.generateNode(Ex, Pred, StateFalse, tags.second);
2414 void ExprEngine::VisitGCCAsmStmt(const GCCAsmStmt *A, ExplodedNode *Pred,
2416 StmtNodeBuilder Bldr(Pred, Dst, *currBldrCtx);
2424 ProgramStateRef state = Pred->getState();
2427 SVal X = state->getSVal(O, Pred->getLocationContext());
2434 Bldr.generateNode(A, Pred, state);
2437 void ExprEngine::VisitMSAsmStmt(const MSAsmStmt *A, ExplodedNode *Pred,
2439 StmtNodeBuilder Bldr(Pred, Dst, *currBldrCtx);
2440 Bldr.generateNode(A, Pred, Pred->getState());