@@ -180,27 +180,6 @@ struct FnDescription {
180
180
ArgNoTy StreamArgNo;
181
181
};
182
182
183
- [[nodiscard]] ProgramStateRef
184
- escapeArgsStartingFromIndex (ProgramStateRef State, CheckerContext &C,
185
- const CallEvent &Call,
186
- unsigned FirstEscapingArgIndex) {
187
- const auto *CE = Call.getOriginExpr ();
188
- assert (CE);
189
-
190
- if (Call.getNumArgs () <= FirstEscapingArgIndex)
191
- return State;
192
-
193
- SmallVector<SVal> EscapingArgs;
194
- EscapingArgs.reserve (Call.getNumArgs () - FirstEscapingArgIndex);
195
- for (auto EscArgIdx :
196
- llvm::seq<int >(FirstEscapingArgIndex, Call.getNumArgs ()))
197
- EscapingArgs.push_back (Call.getArgSVal (EscArgIdx));
198
- State = State->invalidateRegions (EscapingArgs, CE, C.blockCount (),
199
- C.getLocationContext (),
200
- /* CausesPointerEscape=*/ false );
201
- return State;
202
- }
203
-
204
183
// / Get the value of the stream argument out of the passed call event.
205
184
// / The call should contain a function that is described by Desc.
206
185
SVal getStreamArg (const FnDescription *Desc, const CallEvent &Call) {
@@ -1054,10 +1033,6 @@ void StreamChecker::evalFscanf(const FnDescription *Desc, const CallEvent &Call,
1054
1033
if (!E.Init (Desc, Call, C, State))
1055
1034
return ;
1056
1035
1057
- // The pointers passed to fscanf escape and get invalidated.
1058
- State =
1059
- escapeArgsStartingFromIndex (State, C, Call, /* FirstEscapingArgIndex=*/ 2 );
1060
-
1061
1036
// Add the success state.
1062
1037
// In this context "success" means there is not an EOF or other read error
1063
1038
// before any item is matched in 'fscanf'. But there may be match failure,
0 commit comments