Cppcheck
|
Classes | |
struct | Condition |
Public Member Functions | |
virtual std::vector< Condition > | parse (const Token *tok, const Settings &settings) const =0 |
virtual Analyzer::Result | forward (Token *start, const Token *stop, const Token *exprTok, const std::list< ValueFlow::Value > &values, TokenList &tokenlist, ErrorLogger &errorLogger, const Settings &settings, SourceLocation loc=SourceLocation::current()) const |
virtual Analyzer::Result | forward (Token *top, const Token *exprTok, const std::list< ValueFlow::Value > &values, TokenList &tokenlist, ErrorLogger &errorLogger, const Settings &settings, SourceLocation loc=SourceLocation::current()) const |
virtual void | reverse (Token *start, const Token *endToken, const Token *exprTok, const std::list< ValueFlow::Value > &values, TokenList &tokenlist, ErrorLogger &errorLogger, const Settings &settings, SourceLocation loc=SourceLocation::current()) const |
void | traverseCondition (const SymbolDatabase &symboldatabase, const Settings &settings, const std::set< const Scope * > &skippedFunctions, const std::function< void(const Condition &cond, Token *tok, const Scope *scope)> &f) const |
void | beforeCondition (TokenList &tokenlist, const SymbolDatabase &symboldatabase, ErrorLogger &errorLogger, const Settings &settings, const std::set< const Scope * > &skippedFunctions) const |
void | afterCondition (TokenList &tokenlist, const SymbolDatabase &symboldatabase, ErrorLogger &errorLogger, const Settings &settings, const std::set< const Scope * > &skippedFunctions) const |
virtual | ~ConditionHandler ()=default |
ConditionHandler (const ConditionHandler &)=default | |
Static Public Member Functions | |
static Token * | skipNotAndCasts (Token *tok, bool *inverted=nullptr) |
static void | fillFromPath (ProgramMemory &pm, const Token *top, MathLib::bigint path, const Settings &settings) |
Protected Member Functions | |
ConditionHandler ()=default | |
Definition at line 6292 of file valueflow.cpp.
|
virtualdefault |
|
default |
|
protecteddefault |
|
inline |
Definition at line 6580 of file valueflow.cpp.
References Analyzer::Result::action, astIsFloat(), astIsLHS(), Token::astOperand1(), Token::astOperand2(), Token::astParent(), Token::astTop(), bailout, Scope::bodyEnd, changeKnownToPossible(), changePossibleToKnown(), Settings::debugwarnings, Analyzer::Escape, execute(), Token::expressionString(), ConditionHandler::Condition::getContextAndValues(), ValueFlow::getEndOfExprScope(), getInitTok(), getLoopScope(), ConditionHandler::Condition::getPath(), getStepTok(), ConditionHandler::Condition::isBool(), isBreakOrContinueScope(), isBreakScope(), Token::isExpandedMacro(), ValueFlow::Value::isImpossible(), Analyzer::Action::isModified(), ValueFlow::Value::isPossible(), isReturnScope(), isVariableChanged(), Settings::library, Token::link(), Token::linkAt(), ValueFlow::Value::Lower, Token::Match(), Analyzer::Modified, Analyzer::None, ValueFlow::Value::Point, Token::previous(), Token::simpleMatch(), Token::str(), Analyzer::Result::terminate, Token::tokAt(), ValueFlow::Value::Upper, valueFlowSetConditionToKnown(), Token::valueType(), Token::variable(), Token::varId(), and ConditionHandler::Condition::vartok.
|
inline |
Definition at line 6432 of file valueflow.cpp.
References Token::astParent(), Token::astTop(), bailout, Settings::debugwarnings, Token::expressionString(), Token::exprId(), ConditionHandler::Condition::false_values, findExpressionChanged(), Token::hasKnownIntValue(), ValueFlow::Value::intvalue, Token::isExpandedMacro(), ValueFlow::Value::isIntValue(), Token::link(), Token::Match(), Token::previous(), reverse(), ValueType::sign, Token::simpleMatch(), traverseCondition(), ConditionHandler::Condition::true_values, Token::valueType(), and ConditionHandler::Condition::vartok.
|
inlinestatic |
Definition at line 6565 of file valueflow.cpp.
References ValueFlow::findValue(), op1_and_op2, ProgramMemory::setValue(), Token::values(), and visitAstNodes().
|
inlinevirtual |
Definition at line 6360 of file valueflow.cpp.
References Token::next(), and valueFlowForward().
|
inlinevirtual |
Definition at line 6372 of file valueflow.cpp.
References valueFlowForwardRecursive().
|
pure virtual |
Implemented in ContainerConditionHandler, SymbolicConditionHandler, IteratorConditionHandler, and SimpleConditionHandler.
Referenced by traverseCondition().
|
inlinevirtual |
Definition at line 6383 of file valueflow.cpp.
References valueFlowReverse().
Referenced by beforeCondition().
|
inlinestatic |
Definition at line 6541 of file valueflow.cpp.
References astIsBool(), Token::astParent(), Token::astSibling(), Token::hasKnownIntValue(), Token::Match(), Token::simpleMatch(), and Token::values().
Referenced by ConditionHandler::Condition::getContextAndValues().
|
inline |
Definition at line 6395 of file valueflow.cpp.
References Token::astParent(), Token::astTop(), Scope::bodyEnd, Scope::bodyStart, Token::exprId(), ConditionHandler::Condition::false_values, SymbolDatabase::functionScopes, Token::hasKnownIntValue(), isConstExpression(), Settings::library, Token::Match(), Token::next(), parse(), Token::previous(), ConditionHandler::Condition::true_values, and ConditionHandler::Condition::vartok.
Referenced by beforeCondition().