Skip to content

Commit 4699789

Browse files
authored
[clang][analyzer][NFC] Supplement comments in evalFtell of StreamChecker (#74291)
1 parent f5adb5b commit 4699789

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,9 @@ void StreamChecker::evalFtell(const FnDescription *Desc, const CallEvent &Call,
10721072
ProgramStateRef StateFailed = State->BindExpr(
10731073
CE, C.getLocationContext(), SVB.makeIntVal(-1, C.getASTContext().LongTy));
10741074

1075+
// This function does not affect the stream state.
1076+
// Still we add success and failure state with the appropriate return value.
1077+
// StdLibraryFunctionsChecker can change these states (set the 'errno' state).
10751078
C.addTransition(StateNotFailed);
10761079
C.addTransition(StateFailed);
10771080
}

0 commit comments

Comments
 (0)