Cppcheck
|
#include <analyzer.h>
Classes | |
struct | Action |
struct | Assume |
struct | Result |
Public Types | |
enum class | Terminate { None , Bail , Escape , Modified , Inconclusive , Conditional } |
enum class | Direction { Forward , Reverse } |
enum class | Evaluate { Integral , ContainerEmpty } |
Public Member Functions | |
virtual Action | analyze (const Token *tok, Direction d) const =0 |
Analyze a token. More... | |
virtual void | update (Token *tok, Action a, Direction d)=0 |
Update the state of the value. More... | |
virtual std::vector< MathLib::bigint > | evaluate (Evaluate e, const Token *tok, const Token *ctx=nullptr) const =0 |
Try to evaluate the value of a token(most likely a condition) More... | |
std::vector< MathLib::bigint > | evaluate (const Token *tok, const Token *ctx=nullptr) const |
virtual bool | lowerToPossible ()=0 |
Lower any values to possible. More... | |
virtual bool | lowerToInconclusive ()=0 |
Lower any values to inconclusive. More... | |
virtual bool | updateScope (const Token *endBlock, bool modified) const =0 |
If the analysis is unsure whether to update a scope, this will return true if the analysis should bifurcate the scope. More... | |
virtual bool | isConditional () const =0 |
If the value is conditional. More... | |
virtual bool | stopOnCondition (const Token *condTok) const =0 |
If analysis should stop on the condition. More... | |
virtual void | assume (const Token *tok, bool state, unsigned int flags=0)=0 |
The condition that will be assumed during analysis. More... | |
virtual void | updateState (const Token *tok)=0 |
Update the state of the program at the token. More... | |
virtual ValuePtr< Analyzer > | reanalyze (Token *tok, const std::string &msg=emptyString) const =0 |
Return analyzer for expression at token. More... | |
virtual bool | invalid () const |
virtual | ~Analyzer ()=default |
Analyzer (const Analyzer &)=default | |
Protected Member Functions | |
Analyzer ()=default | |
Definition at line 32 of file analyzer.h.
|
strong |
Enumerator | |
---|---|
Forward | |
Reverse |
Definition at line 149 of file analyzer.h.
|
strong |
Enumerator | |
---|---|
Integral | |
ContainerEmpty |
Definition at line 160 of file analyzer.h.
|
strong |
Enumerator | |
---|---|
None | |
Bail | |
Escape | |
Modified | |
Inconclusive | |
Conditional |
Definition at line 133 of file analyzer.h.
|
virtualdefault |
|
default |
|
protecteddefault |
Analyze a token.
Implemented in ValueFlowAnalyzer.
|
pure virtual |
The condition that will be assumed during analysis.
Implemented in ValueFlowAnalyzer.
|
inline |
Definition at line 168 of file analyzer.h.
References evaluate(), and Integral.
|
pure virtual |
Try to evaluate the value of a token(most likely a condition)
Implemented in ValueFlowAnalyzer.
Referenced by evaluate().
|
inlinevirtual |
Reimplemented in ExpressionAnalyzer.
Definition at line 188 of file analyzer.h.
Referenced by ValueFlowAnalyzer::analyze().
|
pure virtual |
If the value is conditional.
Implemented in MultiValueFlowAnalyzer, and SingleValueFlowAnalyzer.
|
pure virtual |
Lower any values to inconclusive.
Implemented in MultiValueFlowAnalyzer, and SingleValueFlowAnalyzer.
Referenced by ValueFlowAnalyzer::update().
|
pure virtual |
Lower any values to possible.
Implemented in MultiValueFlowAnalyzer, and SingleValueFlowAnalyzer.
|
pure virtual |
Return analyzer for expression at token.
Implemented in SingleValueFlowAnalyzer, SubExpressionAnalyzer, and ValueFlowAnalyzer.
|
pure virtual |
If analysis should stop on the condition.
Implemented in MultiValueFlowAnalyzer, and SingleValueFlowAnalyzer.
Update the state of the value.
Implemented in ValueFlowAnalyzer.
|
pure virtual |
If the analysis is unsure whether to update a scope, this will return true if the analysis should bifurcate the scope.
Implemented in MultiValueFlowAnalyzer, and SingleValueFlowAnalyzer.
|
pure virtual |
Update the state of the program at the token.
Implemented in ValueFlowAnalyzer.