Cppcheck
|
#include <functional>
#include <stack>
#include <string>
#include <type_traits>
#include <vector>
#include "config.h"
#include "errortypes.h"
#include "library.h"
#include "smallvector.h"
#include "symboldatabase.h"
#include "token.h"
Go to the source code of this file.
Functions | |
std::vector< MathLib::bigint > | evaluateKnownValues (const Token *tok) |
template<class T , class Predicate , class Found , REQUIRES("T must be a Token class", std::is_convertible< T *, const Token * >) > | |
void | findTokensImpl (T *start, const Token *end, const Predicate &pred, Found found) |
template<class T , class Predicate , REQUIRES("T must be a Token class", std::is_convertible< T *, const Token * >) > | |
std::vector< T * > | findTokens (T *start, const Token *end, const Predicate &pred) |
template<class T , class Predicate , REQUIRES("T must be a Token class", std::is_convertible< T *, const Token * >) > | |
T * | findToken (T *start, const Token *end, const Predicate &pred) |
template<class T , class Predicate , class Found , class Evaluate , REQUIRES("T must be a Token class", std::is_convertible< T *, const Token * >) > | |
bool | findTokensSkipDeadCodeImpl (const Library &library, T *start, const Token *end, const Predicate &pred, Found found, const Evaluate &evaluate) |
template<class T , class Predicate , class Evaluate , REQUIRES("T must be a Token class", std::is_convertible< T *, const Token * >) > | |
std::vector< T * > | findTokensSkipDeadCode (const Library &library, T *start, const Token *end, const Predicate &pred, const Evaluate &evaluate) |
template<class T , class Predicate , REQUIRES("T must be a Token class", std::is_convertible< T *, const Token * >) > | |
std::vector< T * > | findTokensSkipDeadCode (const Library &library, T *start, const Token *end, const Predicate &pred) |
template<class T , class Predicate , class Evaluate , REQUIRES("T must be a Token class", std::is_convertible< T *, const Token * >) > | |
T * | findTokenSkipDeadCode (const Library &library, T *start, const Token *end, const Predicate &pred, const Evaluate &evaluate) |
template<class T , class Predicate , REQUIRES("T must be a Token class", std::is_convertible< T *, const Token * >) > | |
T * | findTokenSkipDeadCode (const Library &library, T *start, const Token *end, const Predicate &pred) |
|
inline |
Definition at line 37 of file findtoken.h.
References Token::getKnownIntValue(), and Token::hasKnownIntValue().
Referenced by findTokenSkipDeadCode(), findTokensSkipDeadCode(), and findVarBound().
T* findToken | ( | T * | start, |
const Token * | end, | ||
const Predicate & | pred | ||
) |
Definition at line 67 of file findtoken.h.
References findTokensImpl().
std::vector<T*> findTokens | ( | T * | start, |
const Token * | end, | ||
const Predicate & | pred | ||
) |
Definition at line 56 of file findtoken.h.
References findTokensImpl().
void findTokensImpl | ( | T * | start, |
const Token * | end, | ||
const Predicate & | pred, | ||
Found | found | ||
) |
Definition at line 45 of file findtoken.h.
References precedes().
Referenced by findToken(), and findTokens().
T* findTokenSkipDeadCode | ( | const Library & | library, |
T * | start, | ||
const Token * | end, | ||
const Predicate & | pred | ||
) |
Definition at line 216 of file findtoken.h.
References evaluateKnownValues(), and findTokenSkipDeadCode().
T* findTokenSkipDeadCode | ( | const Library & | library, |
T * | start, | ||
const Token * | end, | ||
const Predicate & | pred, | ||
const Evaluate & | evaluate | ||
) |
Definition at line 199 of file findtoken.h.
References evaluate(), and findTokensSkipDeadCodeImpl().
Referenced by findTokenSkipDeadCode().
std::vector<T*> findTokensSkipDeadCode | ( | const Library & | library, |
T * | start, | ||
const Token * | end, | ||
const Predicate & | pred | ||
) |
Definition at line 193 of file findtoken.h.
References evaluateKnownValues(), and findTokensSkipDeadCode().
std::vector<T*> findTokensSkipDeadCode | ( | const Library & | library, |
T * | start, | ||
const Token * | end, | ||
const Predicate & | pred, | ||
const Evaluate & | evaluate | ||
) |
Definition at line 172 of file findtoken.h.
References evaluate(), and findTokensSkipDeadCodeImpl().
Referenced by findAllUsages(), and findTokensSkipDeadCode().
bool findTokensSkipDeadCodeImpl | ( | const Library & | library, |
T * | start, | ||
const Token * | end, | ||
const Predicate & | pred, | ||
Found | found, | ||
const Evaluate & | evaluate | ||
) |
Definition at line 82 of file findtoken.h.
References astIsLHS(), evaluate(), getCondTok(), getCondTokFromEnd(), isReturnScope(), Token::Match(), nextAfterAstRightmostLeaf(), precedes(), and Token::simpleMatch().
Referenced by findTokenSkipDeadCode(), and findTokensSkipDeadCode().