25 #include <type_traits> 
   40                  REQUIRES(
"T must be convertible to unsigned int", std::is_convertible<T, unsigned int> ),
 
   41                  REQUIRES(
"T must not be a bool", !std::is_same<T, bool> )>
 
   59         void set(
unsigned int f, 
bool state = 
true) {
 
   63         bool get(
unsigned int f)
 const {
 
   64             return ((
mFlag & f) != 0);
 
  183     virtual void assume(
const Token* tok, 
bool state, 
unsigned int flags = 0) = 0;
 
The token list that the TokenList generates is a linked-list of this class.
 
#define REQUIRES(msg,...)
 
static const std::string emptyString
 
friend Action operator|(Action a, Action b)
 
bool get(unsigned int f) const
 
Action(const Action &)=default
 
bool isInconclusive() const
 
bool isIdempotent() const
 
friend bool operator==(Action a, Action b)
 
friend bool operator!=(Action a, Action b)
 
bool isSymbolicMatch() const
 
Action & operator=(const Action &rhs)=default
 
void set(unsigned int f, bool state=true)
 
bool isIncremental() const
 
Action & operator|=(Action a)
 
Result(Action action=Action::None, Terminate terminate=Terminate::None)
 
virtual bool isConditional() const =0
If the value is conditional.
 
Analyzer(const Analyzer &)=default
 
virtual Action analyze(const Token *tok, Direction d) const =0
Analyze a token.
 
virtual void update(Token *tok, Action a, Direction d)=0
Update the state of the value.
 
virtual bool lowerToPossible()=0
Lower any values to possible.
 
virtual void updateState(const Token *tok)=0
Update the state of the program at the token.
 
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)
 
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 bif...
 
virtual bool stopOnCondition(const Token *condTok) const =0
If analysis should stop on the condition.
 
virtual ~Analyzer()=default
 
virtual ValuePtr< Analyzer > reanalyze(Token *tok, const std::string &msg=emptyString) const =0
Return analyzer for expression at token.
 
virtual bool lowerToInconclusive()=0
Lower any values to inconclusive.
 
virtual bool invalid() const
 
virtual void assume(const Token *tok, bool state, unsigned int flags=0)=0
The condition that will be assumed during analysis.
 
std::vector< MathLib::bigint > evaluate(const Token *tok, const Token *ctx=nullptr) const