Cppcheck
|
Public Member Functions | |
LifetimeStore ()=default | |
LifetimeStore (const Token *argtok, std::string message, ValueFlow::Value::LifetimeKind type=ValueFlow::Value::LifetimeKind::Object, bool inconclusive=false) | |
template<class Predicate > | |
bool | byRef (Token *tok, const TokenList &tokenlist, ErrorLogger &errorLogger, const Settings &settings, Predicate pred, SourceLocation loc=SourceLocation::current()) |
bool | byRef (Token *tok, const TokenList &tokenlist, ErrorLogger &errorLogger, const Settings &settings, SourceLocation loc=SourceLocation::current()) |
template<class Predicate > | |
bool | byVal (Token *tok, const TokenList &tokenlist, ErrorLogger &errorLogger, const Settings &settings, Predicate pred, SourceLocation loc=SourceLocation::current()) |
bool | byVal (Token *tok, const TokenList &tokenlist, ErrorLogger &errorLogger, const Settings &settings, SourceLocation loc=SourceLocation::current()) |
template<class Predicate > | |
bool | byDerefCopy (Token *tok, const TokenList &tokenlist, ErrorLogger &errorLogger, const Settings &settings, Predicate pred, SourceLocation loc=SourceLocation::current()) const |
bool | byDerefCopy (Token *tok, const TokenList &tokenlist, ErrorLogger &errorLogger, const Settings &settings, SourceLocation loc=SourceLocation::current()) const |
Static Public Member Functions | |
template<class F > | |
static void | forEach (const TokenList &tokenlist, ErrorLogger &errorLogger, const Settings &settings, const std::vector< const Token * > &argtoks, const std::string &message, ValueFlow::Value::LifetimeKind type, F f) |
static LifetimeStore | fromFunctionArg (const Function *f, const Token *tok, const Variable *var, const TokenList &tokenlist, const Settings &settings, ErrorLogger &errorLogger) |
Public Attributes | |
const Token * | argtok {} |
std::string | message |
ValueFlow::Value::LifetimeKind | type = ValueFlow::Value::LifetimeKind::Object |
ErrorPath | errorPath |
bool | inconclusive {} |
bool | forward = true |
Private Member Functions | |
void | forwardLifetime (Token *tok, const TokenList &tokenlist, ErrorLogger &errorLogger, const Settings &settings) |
Private Attributes | |
Token * | forwardTok {} |
Definition at line 4103 of file valueflow.cpp.
|
default |
|
inline |
Definition at line 4113 of file valueflow.cpp.
|
inline |
Definition at line 4322 of file valueflow.cpp.
References argtok, Settings::certainty, Variable::declarationId(), Variable::declEndToken(), errorPath, ValueFlow::getLifetimeVariable(), inconclusive, inconclusive, SimpleEnableGroup< T >::isEnabled(), message, Token::previous(), type, and Token::values().
Referenced by byDerefCopy(), valueFlowLifetimeConstructor(), and valueFlowLifetimeFunction().
|
inline |
Definition at line 4358 of file valueflow.cpp.
References byDerefCopy().
|
inline |
Definition at line 4168 of file valueflow.cpp.
References argtok, Settings::certainty, Settings::debugnormal, errorPath, ValueFlow::Value::errorPath, forward, forwardLifetime(), ValueFlow::getLifetimeTokens(), inconclusive, inconclusive, SimpleEnableGroup< T >::isEnabled(), ValueFlow::Value::LIFETIME, ValueFlow::Value::lifetimeKind, ValueFlow::Value::lifetimeScope, ValueFlow::Value::Local, message, ValueFlow::Value::setInconclusive(), setSourceLocation(), setTokenValue(), ValueFlow::Value::tokvalue, type, Token::values(), and ValueFlow::Value::valueType.
Referenced by byRef(), valueFlowLifetime(), valueFlowLifetimeClassConstructor(), valueFlowLifetimeFunction(), and valueFlowLifetimeUserConstructor().
|
inline |
Definition at line 4209 of file valueflow.cpp.
References byRef().
|
inline |
Definition at line 4227 of file valueflow.cpp.
References argtok, ValueFlow::Value::Argument, ValueFlow::Value::capturetok, Settings::certainty, Settings::debugnormal, errorPath, ValueFlow::Value::errorPath, forward, forwardLifetime(), ValueFlow::getLifetimeTokens(), inconclusive, inconclusive, Variable::isArgument(), SimpleEnableGroup< T >::isEnabled(), ValueFlow::Value::LIFETIME, ValueFlow::Value::lifetimeKind, ValueFlow::Value::lifetimeScope, message, ValueFlow::Value::path, ValueFlow::Value::setInconclusive(), setSourceLocation(), setTokenValue(), ValueFlow::Value::tokvalue, type, Token::values(), and ValueFlow::Value::valueType.
Referenced by byVal(), valueFlowLifetimeClassConstructor(), valueFlowLifetimeConstructor(), valueFlowLifetimeFunction(), and valueFlowLifetimeUserConstructor().
|
inline |
Definition at line 4304 of file valueflow.cpp.
References byVal().
|
inlinestatic |
Definition at line 4124 of file valueflow.cpp.
References message, type, and valueFlowForwardLifetime().
Referenced by valueFlowLifetimeClassConstructor(), valueFlowLifetimeConstructor(), and valueFlowLifetimeUserConstructor().
|
inlineprivate |
Definition at line 4378 of file valueflow.cpp.
References forwardTok, and valueFlowForwardLifetime().
|
inlinestatic |
Definition at line 4144 of file valueflow.cpp.
References bailout, Settings::debugwarnings, Token::expressionString(), getArgumentPos(), getArguments(), Variable::isArgument(), ValueFlow::Value::Object, and Token::str().
Referenced by valueFlowLifetimeFunction().
const Token* LifetimeStore::argtok {} |
Definition at line 4104 of file valueflow.cpp.
Referenced by byDerefCopy(), byRef(), byVal(), valueFlowLifetimeClassConstructor(), valueFlowLifetimeFunction(), and valueFlowLifetimeUserConstructor().
ErrorPath LifetimeStore::errorPath |
Definition at line 4107 of file valueflow.cpp.
Referenced by byDerefCopy(), byRef(), byVal(), and valueFlowLifetimeFunction().
bool LifetimeStore::forward = true |
Definition at line 4109 of file valueflow.cpp.
Referenced by byRef(), byVal(), and valueFlowLifetimeFunction().
|
private |
Definition at line 4377 of file valueflow.cpp.
Referenced by forwardLifetime().
bool LifetimeStore::inconclusive {} |
Definition at line 4108 of file valueflow.cpp.
Referenced by byDerefCopy(), byRef(), byVal(), valueFlowLifetimeClassConstructor(), valueFlowLifetimeFunction(), and valueFlowLifetimeUserConstructor().
std::string LifetimeStore::message |
Definition at line 4105 of file valueflow.cpp.
Referenced by byDerefCopy(), byRef(), byVal(), and forEach().
ValueFlow::Value::LifetimeKind LifetimeStore::type = ValueFlow::Value::LifetimeKind::Object |
Definition at line 4106 of file valueflow.cpp.
Referenced by byDerefCopy(), byRef(), byVal(), and forEach().