Cppcheck
|
#include "token.h"
#include "astutils.h"
#include "errortypes.h"
#include "library.h"
#include "settings.h"
#include "simplecpp.h"
#include "symboldatabase.h"
#include "tokenlist.h"
#include "utils.h"
#include "tokenrange.h"
#include "valueflow.h"
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <iterator>
#include <map>
#include <set>
#include <sstream>
#include <stack>
#include <type_traits>
#include <unordered_set>
#include <utility>
Go to the source code of this file.
Typedefs | |
using | ValueIterator = std::list< ValueFlow::Value >::iterator |
Functions | |
template<class T , REQUIRES("T must be a Token class", std::is_convertible< T *, const Token * >) > | |
static T * | tokAtImpl (T *tok, int index) |
template<class T , REQUIRES("T must be a Token class", std::is_convertible< T *, const Token * >) > | |
static T * | linkAtImpl (T *thisTok, int index) |
static int | multiComparePercent (const Token *tok, const char *&haystack, nonneg int varid) |
static int | multiCompareImpl (const Token *tok, const char *haystack, nonneg int varid) |
template<class T , REQUIRES("T must be a Token class", std::is_convertible< T *, const Token * >) > | |
static T * | nextArgumentImpl (T *thisTok) |
static bool | isOperator (const Token *tok) |
template<class T , REQUIRES("T must be a Token class", std::is_convertible< T *, const Token * >) > | |
static T * | findsimplematchImpl (T *const startTok, const char pattern[], size_t pattern_len) |
template<class T , REQUIRES("T must be a Token class", std::is_convertible< T *, const Token * >) > | |
static T * | findsimplematchImpl (T *const startTok, const char pattern[], size_t pattern_len, const Token *const end) |
template<class T , REQUIRES("T must be a Token class", std::is_convertible< T *, const Token * >) > | |
static T * | findmatchImpl (T *const startTok, const char pattern[], const nonneg int varId) |
template<class T , REQUIRES("T must be a Token class", std::is_convertible< T *, const Token * >) > | |
static T * | findmatchImpl (T *const startTok, const char pattern[], const Token *const end, const nonneg int varId) |
static const Token * | goToLeftParenthesis (const Token *start, const Token *end) |
static const Token * | goToRightParenthesis (const Token *start, const Token *end) |
static std::string | stringFromTokenRange (const Token *start, const Token *end) |
static void | astStringXml (const Token *tok, nonneg int indent, std::ostream &out) |
static void | indent (std::string &str, const nonneg int indent1, const nonneg int indent2) |
static bool | isAdjacent (const ValueFlow::Value &x, const ValueFlow::Value &y) |
static bool | removePointValue (std::list< ValueFlow::Value > &values, std::list< ValueFlow::Value >::iterator &x) |
static bool | removeContradiction (std::list< ValueFlow::Value > &values) |
template<class Iterator > | |
static ValueIterator | removeAdjacentValues (std::list< ValueFlow::Value > &values, ValueIterator x, Iterator start, Iterator last) |
static void | mergeAdjacent (std::list< ValueFlow::Value > &values) |
static void | removeOverlaps (std::list< ValueFlow::Value > &values) |
static void | removeContradictions (std::list< ValueFlow::Value > &values) |
static bool | sameValueType (const ValueFlow::Value &x, const ValueFlow::Value &y) |
template<class Compare > | |
static const ValueFlow::Value * | getCompareValue (const std::list< ValueFlow::Value > &values, bool condition, MathLib::bigint path, Compare compare) |
Token * | findTypeEnd (Token *tok) |
Token * | findLambdaEndScope (Token *tok) |
const Token * | findLambdaEndScope (const Token *tok) |
Variables | |
static const std::unordered_set< std::string > | controlFlowKeywords |
static const std::unordered_set< std::string > | stdTypes |
using ValueIterator = std::list<ValueFlow::Value>::iterator |
Definition at line 1653 of file token.cpp.
References Token::astOperand1(), Token::astOperand2(), Token::function(), indent(), Token::str(), Token::values(), Token::variable(), and Token::varId().
|
static |
Definition at line 1056 of file token.cpp.
References Token::Match().
Referenced by Token::findmatch().
|
static |
Definition at line 1075 of file token.cpp.
References Token::Match(), and Token::next().
|
static |
Definition at line 1017 of file token.cpp.
References Token::simpleMatch().
Referenced by Token::findsimplematch().
|
static |
Definition at line 1037 of file token.cpp.
References Token::next(), and Token::simpleMatch().
|
static |
Definition at line 2573 of file token.cpp.
References ValueFlow::Value::intvalue.
Referenced by Token::getMaxValue(), and Token::getMinValue().
Definition at line 1480 of file token.cpp.
References Token::link(), and Token::next().
Referenced by Token::findExpressionStartEndTokens().
Definition at line 1497 of file token.cpp.
References Token::link(), and Token::previous().
Referenced by Token::findExpressionStartEndTokens().
Definition at line 1708 of file token.cpp.
Referenced by astStringXml(), CheckIO::checkFileUsage(), CheckUninitVar::checkRhs(), clangimport::AstNode::dumpAst(), plistLoc(), TemplateSimplifier::printOut(), SymbolDatabase::printVariable(), and Tokenizer::simplifyFunctionPointers().
|
static |
Definition at line 2026 of file token.cpp.
References ValueFlow::Value::bound, ValueFlow::Value::FLOAT, ValueFlow::Value::intvalue, ValueFlow::Value::Point, and ValueFlow::Value::valueType.
Referenced by mergeAdjacent(), and removeAdjacentValues().
|
static |
Definition at line 909 of file token.cpp.
References Token::link(), and Token::strAt().
Referenced by Token::findClosingBracket().
|
static |
Definition at line 404 of file token.cpp.
Referenced by Token::linkAt().
|
static |
Definition at line 2124 of file token.cpp.
References ValueFlow::Value::FLOAT, isAdjacent(), ValueFlow::Value::Lower, ValueFlow::Value::Point, removeAdjacentValues(), ValueFlow::Value::sameToken(), and ValueFlow::Value::Upper.
Referenced by removeOverlaps().
Definition at line 572 of file token.cpp.
References multiComparePercent(), and Token::str().
Referenced by Token::Match(), and Token::multiCompare().
|
static |
Definition at line 435 of file token.cpp.
References Token::eBitOp, Token::eChar, Token::eLogicalOp, Token::eString, Token::isAssignmentOp(), Token::isBoolean(), Token::isComparisonOp(), Token::isConstOp(), Token::isName(), Token::isNumber(), Token::isOp(), Token::str(), Token::tokType(), and Token::varId().
Referenced by multiCompareImpl().
|
static |
Definition at line 856 of file token.cpp.
References Token::Match().
Referenced by Token::nextArgument().
|
static |
|
static |
Definition at line 2045 of file token.cpp.
References ValueFlow::Value::Lower, removePointValue(), ValueFlow::Value::sameToken(), and ValueFlow::Value::Upper.
Referenced by removeContradictions().
|
static |
Definition at line 2208 of file token.cpp.
References removeContradiction(), and removeOverlaps().
Referenced by Token::addValue().
|
static |
Definition at line 2180 of file token.cpp.
References ValueFlow::Value::bound, ValueFlow::Value::isNonValue(), mergeAdjacent(), ValueFlow::Value::valueKind, and ValueFlow::Value::valueType.
Referenced by removeContradictions().
|
static |
Definition at line 2035 of file token.cpp.
References ValueFlow::Value::Point.
Referenced by removeContradiction().
|
static |
Definition at line 2218 of file token.cpp.
References Token::exprId(), ValueFlow::Value::isSymbolicValue(), ValueFlow::Value::tokvalue, and ValueFlow::Value::valueType.
Referenced by Token::addValue().
Definition at line 1611 of file token.cpp.
References Token::eString, Token::Match(), and Token::next().
Referenced by Token::expressionString().
|
static |
Definition at line 380 of file token.cpp.
Referenced by Token::tokAt().
|
static |
Definition at line 89 of file token.cpp.
Referenced by Token::update_property_info().
|
static |
Definition at line 168 of file token.cpp.
Referenced by Token::update_property_isStandardType().