@@ -833,6 +833,7 @@ void GCChecker::checkBeginFunction(CheckerContext &C) const {
833
833
const auto *FD = dyn_cast<FunctionDecl>(LCtx->getDecl ());
834
834
if (!FD)
835
835
return ;
836
+ logWithDump (" checkBeginFunction" , FD);
836
837
ProgramStateRef State = C.getState ();
837
838
bool Change = false ;
838
839
if (C.inTopFrame ()) {
@@ -880,6 +881,7 @@ void GCChecker::checkBeginFunction(CheckerContext &C) const {
880
881
881
882
void GCChecker::checkEndFunction (const clang::ReturnStmt *RS,
882
883
CheckerContext &C) const {
884
+ log (" checkEndFunction" );
883
885
ProgramStateRef State = C.getState ();
884
886
885
887
if (RS && gcEnabledHere (C) && RS->getRetValue () && isGCTracked (RS->getRetValue ())) {
@@ -1153,7 +1155,7 @@ bool GCChecker::processArgumentRooting(const CallEvent &Call, CheckerContext &C,
1153
1155
const ValueState *CurrentVState = State->get <GCValueMap>(RootedSymbol);
1154
1156
ValueState NewVState = *OldVState;
1155
1157
// 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)) {
1157
1159
NewVState = ValueState::getNotPinned (*OldVState);
1158
1160
}
1159
1161
logWithDump (" - Rooted set to" , NewVState);
@@ -1245,8 +1247,11 @@ bool GCChecker::processAllocationOfResult(const CallEvent &Call,
1245
1247
void GCChecker::checkPostCall (const CallEvent &Call, CheckerContext &C) const {
1246
1248
logWithDump (" checkPostCall" , Call);
1247
1249
ProgramStateRef State = C.getState ();
1250
+ log (" - processArgmentRooting" );
1248
1251
bool didChange = processArgumentRooting (Call, C, State);
1252
+ log (" - processPotentialsafepoint" );
1249
1253
didChange |= processPotentialSafepoint (Call, C, State);
1254
+ log (" - processAllocationOfResult" );
1250
1255
didChange |= processAllocationOfResult (Call, C, State);
1251
1256
if (didChange)
1252
1257
C.addTransition (State);
@@ -1255,6 +1260,7 @@ void GCChecker::checkPostCall(const CallEvent &Call, CheckerContext &C) const {
1255
1260
// Implicitly root values that were casted to globally rooted values
1256
1261
void GCChecker::checkPostStmt (const CStyleCastExpr *CE,
1257
1262
CheckerContext &C) const {
1263
+ logWithDump (" checkpostStmt(CStyleCastExpr)" , CE);
1258
1264
if (!isGloballyRootedType (CE->getTypeAsWritten ()))
1259
1265
return ;
1260
1266
SymbolRef Sym = C.getSVal (CE).getAsSymbol ();
@@ -1481,6 +1487,7 @@ void GCChecker::checkPostStmt(const MemberExpr *ME, CheckerContext &C) const {
1481
1487
1482
1488
void GCChecker::checkPostStmt (const UnaryOperator *UO,
1483
1489
CheckerContext &C) const {
1490
+ logWithDump (" checkPostStmt(UnaryOperator)" , UO);
1484
1491
if (UO->getOpcode () == UO_Deref) {
1485
1492
checkDerivingExpr (UO, UO->getSubExpr (), true , C);
1486
1493
}
@@ -1994,6 +2001,7 @@ bool GCChecker::rootRegionIfGlobal(const MemRegion *R, ProgramStateRef &State,
1994
2001
1995
2002
void GCChecker::checkLocation (SVal SLoc, bool IsLoad, const Stmt *S,
1996
2003
CheckerContext &C) const {
2004
+ logWithDump (" checkLocation" , SLoc);
1997
2005
ProgramStateRef State = C.getState ();
1998
2006
bool DidChange = false ;
1999
2007
const RootState *RS = nullptr ;
0 commit comments