Lines Matching +full:parameter +full:- +full:less

1 //===-- STLAlgorithmModeling.cpp ----------------------------------*- C++ -*--//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
100 return (this->**Handler)(C, CE);
105 // std::find()-like functions either take their primary range in the first
106 // two parameters, or if the first parameter is "execution policy" then in
107 // the second and third. This means that the second parameter must always be
109 if (!isIteratorType(CE->getArg(1)->getType()))
112 // If no "execution policy" parameter is used then the first argument is the
114 if (isIteratorType(CE->getArg(0)->getType())) {
119 // If "execution policy" parameter is used then the second argument is the
121 if (isIteratorType(CE->getArg(2)->getType())) {
136 SVal Param = State->getSVal(CE->getArg(paramNum), LCtx);
138 auto StateFound = State->BindExpr(CE, LCtx, RetVal);
140 // If we have an iterator position for the range-begin argument then we can
146 StateFound = createIteratorPosition(StateFound, RetVal, Pos->getContainer(),
152 nonloc::SymbolVal(NewPos->getOffset()),
153 nonloc::SymbolVal(Pos->getOffset()),
157 StateFound = StateFound->assume(GreaterOrEqual.castAs<DefinedSVal>(), true);
160 Param = State->getSVal(CE->getArg(paramNum + 1), LCtx);
162 // If we have an iterator position for the range-end argument then we can
168 StateFound = createIteratorPosition(StateFound, RetVal, Pos->getContainer(),
173 SVal Less = SVB.evalBinOp(StateFound, BO_LT,
174 nonloc::SymbolVal(NewPos->getOffset()),
175 nonloc::SymbolVal(Pos->getOffset()),
177 assert(isa<DefinedSVal>(Less) &&
179 StateFound = StateFound->assume(Less.castAs<DefinedSVal>(), true);
185 auto StateNotFound = State->BindExpr(CE, LCtx, Param);
194 Checker->AggressiveStdFindModeling =