66 const std::function<
bool(
const Value&)> &pred);
90 static std::vector<LifetimeToken>
setAddressOf(std::vector<LifetimeToken> v,
bool b) {
96 static std::vector<LifetimeToken>
setInconclusive(std::vector<LifetimeToken> v,
bool b) {
109 const std::function<std::vector<MathLib::bigint>(
const Token*)>& eval,
130 bool inconclusive =
false,
This is an interface, which the class responsible of error logging should implement.
This is just a container for general settings so that we don't need to pass individual values to func...
The token list that the TokenList generates is a linked-list of this class.
std::list< ErrorPathItem > ErrorPath
Information about a member variable.
const Token * parseCompareInt(const Token *tok, Value &true_value, Value &false_value, const std::function< std::vector< MathLib::bigint >(const Token *)> &evaluate)
bool isContainerSizeChanged(const Token *tok, int indirect, const Settings &settings, int depth=20)
std::string eitherTheConditionIsRedundant(const Token *condition)
CPPCHECKLIB Value getLifetimeObjValue(const Token *tok, bool inconclusive=false)
const Value * valueFlowConstantFoldAST(Token *expr, const Settings &settings)
Constant folding of expression. This can be used before the full ValueFlow has been executed (ValueFl...
CPPCHECKLIB ValuePtr< InferModel > makeIntegralInferModel()
const Value * findValue(const std::list< Value > &values, const Settings &settings, const std::function< bool(const Value &)> &pred)
std::vector< LifetimeToken > getLifetimeTokens(const Token *tok, const Settings &settings, bool escape=false, Value::ErrorPath errorPath=Value::ErrorPath{})
std::string lifetimeMessage(const Token *tok, const Value *val, Value::ErrorPath &errorPath)
void combineValueProperties(const Value &value1, const Value &value2, Value &result)
bool isLifetimeBorrowed(const Token *tok, const Settings &settings)
const Token * getEndOfExprScope(const Token *tok, const Scope *defaultScope=nullptr, bool smallest=true)
const Variable * getLifetimeVariable(const Token *tok, Value::ErrorPath &errorPath, const Settings &settings, bool *addressOf=nullptr)
bool hasLifetimeToken(const Token *tok, const Token *lifetime, const Settings &settings)
const Token * solveExprValue(const Token *expr, const std::function< std::vector< MathLib::bigint >(const Token *)> &eval, Value &value)
std::vector< Value > isOutOfBounds(const Value &size, const Token *indexTok, bool possible=true)
size_t getSizeOf(const ValueType &vt, const Settings &settings, int maxRecursion=0)
Value asImpossible(Value v)
CPPCHECKLIB std::vector< Value > getLifetimeObjValues(const Token *tok, bool inconclusive=false, MathLib::bigint path=0)
void setValues(TokenList &tokenlist, SymbolDatabase &symboldatabase, ErrorLogger &errorLogger, const Settings &settings, TimerResultsIntf *timerResults)
Perform valueflow analysis.
static ValueFlow::Value evaluate(const std::string &op, const ValueFlow::Value &lhs, const ValueFlow::Value &rhs)
LifetimeToken(const Token *token, bool addressOf, Value::ErrorPath errorPath)
Value::ErrorPath errorPath
static std::vector< LifetimeToken > setInconclusive(std::vector< LifetimeToken > v, bool b)
LifetimeToken(const Token *token, Value::ErrorPath errorPath)
static std::vector< LifetimeToken > setAddressOf(std::vector< LifetimeToken > v, bool b)