@@ -172,7 +172,7 @@ using FnCheck = std::function<void(const StreamChecker *, const FnDescription *,
172
172
const CallEvent &, CheckerContext &)>;
173
173
174
174
using ArgNoTy = unsigned int ;
175
- const ArgNoTy ArgNone = std::numeric_limits<ArgNoTy>::max ();
175
+ static const ArgNoTy ArgNone = std::numeric_limits<ArgNoTy>::max ();
176
176
177
177
struct FnDescription {
178
178
FnCheck PreFn;
@@ -181,8 +181,9 @@ struct FnDescription {
181
181
};
182
182
183
183
[[nodiscard]] ProgramStateRef
184
- escapeArgsAfterIndex (ProgramStateRef State, CheckerContext &C,
185
- const CallEvent &Call, unsigned FirstEscapingArgIndex) {
184
+ escapeArgsStartingFromIndex (ProgramStateRef State, CheckerContext &C,
185
+ const CallEvent &Call,
186
+ unsigned FirstEscapingArgIndex) {
186
187
const auto *CE = Call.getOriginExpr ();
187
188
assert (CE);
188
189
@@ -1054,7 +1055,8 @@ void StreamChecker::evalFscanf(const FnDescription *Desc, const CallEvent &Call,
1054
1055
return ;
1055
1056
1056
1057
// The pointers passed to fscanf escape and get invalidated.
1057
- State = escapeArgsAfterIndex (State, C, Call, /* FirstEscapingArgIndex=*/ 2 );
1058
+ State =
1059
+ escapeArgsStartingFromIndex (State, C, Call, /* FirstEscapingArgIndex=*/ 2 );
1058
1060
1059
1061
// Add the success state.
1060
1062
// In this context "success" means there is not an EOF or other read error
0 commit comments