@@ -833,6 +833,7 @@ void GCChecker::checkBeginFunction(CheckerContext &C) const {
833833 const auto *FD = dyn_cast<FunctionDecl>(LCtx->getDecl ());
834834 if (!FD)
835835 return ;
836+ logWithDump (" checkBeginFunction" , FD);
836837 ProgramStateRef State = C.getState ();
837838 bool Change = false ;
838839 if (C.inTopFrame ()) {
@@ -880,6 +881,7 @@ void GCChecker::checkBeginFunction(CheckerContext &C) const {
880881
881882void GCChecker::checkEndFunction (const clang::ReturnStmt *RS,
882883 CheckerContext &C) const {
884+ log (" checkEndFunction" );
883885 ProgramStateRef State = C.getState ();
884886
885887 if (RS && gcEnabledHere (C) && RS->getRetValue () && isGCTracked (RS->getRetValue ())) {
@@ -1153,7 +1155,7 @@ bool GCChecker::processArgumentRooting(const CallEvent &Call, CheckerContext &C,
11531155 const ValueState *CurrentVState = State->get <GCValueMap>(RootedSymbol);
11541156 ValueState NewVState = *OldVState;
11551157 // If the old state is pinned, the new state is not pinned.
1156- if (OldVState->isPinned () && ((CurrentVState && CurrentVState->isPinnedByAnyway ()) || !CurrentVState)) {
1158+ if (OldVState->isPinned () && ((CurrentVState && ! CurrentVState->isPinnedByAnyway ()) || !CurrentVState)) {
11571159 NewVState = ValueState::getNotPinned (*OldVState);
11581160 }
11591161 logWithDump (" - Rooted set to" , NewVState);
@@ -1245,8 +1247,11 @@ bool GCChecker::processAllocationOfResult(const CallEvent &Call,
12451247void GCChecker::checkPostCall (const CallEvent &Call, CheckerContext &C) const {
12461248 logWithDump (" checkPostCall" , Call);
12471249 ProgramStateRef State = C.getState ();
1250+ log (" - processArgmentRooting" );
12481251 bool didChange = processArgumentRooting (Call, C, State);
1252+ log (" - processPotentialsafepoint" );
12491253 didChange |= processPotentialSafepoint (Call, C, State);
1254+ log (" - processAllocationOfResult" );
12501255 didChange |= processAllocationOfResult (Call, C, State);
12511256 if (didChange)
12521257 C.addTransition (State);
@@ -1255,6 +1260,7 @@ void GCChecker::checkPostCall(const CallEvent &Call, CheckerContext &C) const {
12551260// Implicitly root values that were casted to globally rooted values
12561261void GCChecker::checkPostStmt (const CStyleCastExpr *CE,
12571262 CheckerContext &C) const {
1263+ logWithDump (" checkpostStmt(CStyleCastExpr)" , CE);
12581264 if (!isGloballyRootedType (CE->getTypeAsWritten ()))
12591265 return ;
12601266 SymbolRef Sym = C.getSVal (CE).getAsSymbol ();
@@ -1481,6 +1487,7 @@ void GCChecker::checkPostStmt(const MemberExpr *ME, CheckerContext &C) const {
14811487
14821488void GCChecker::checkPostStmt (const UnaryOperator *UO,
14831489 CheckerContext &C) const {
1490+ logWithDump (" checkPostStmt(UnaryOperator)" , UO);
14841491 if (UO->getOpcode () == UO_Deref) {
14851492 checkDerivingExpr (UO, UO->getSubExpr (), true , C);
14861493 }
@@ -1994,6 +2001,7 @@ bool GCChecker::rootRegionIfGlobal(const MemRegion *R, ProgramStateRef &State,
19942001
19952002void GCChecker::checkLocation (SVal SLoc, bool IsLoad, const Stmt *S,
19962003 CheckerContext &C) const {
2004+ logWithDump (" checkLocation" , SLoc);
19972005 ProgramStateRef State = C.getState ();
19982006 bool DidChange = false ;
19992007 const RootState *RS = nullptr ;
0 commit comments