Cppcheck
|
#include "checkuninitvar.h"
#include "astutils.h"
#include "ctu.h"
#include "errorlogger.h"
#include "library.h"
#include "mathlib.h"
#include "settings.h"
#include "symboldatabase.h"
#include "token.h"
#include "tokenize.h"
#include "checknullpointer.h"
#include <algorithm>
#include <cassert>
#include <functional>
#include <initializer_list>
#include <list>
#include <map>
#include <unordered_set>
#include <vector>
Go to the source code of this file.
Namespaces | |
tinyxml2 | |
Functions | |
static const Token * | getAstParentSkipPossibleCastAndAddressOf (const Token *vartok, bool *unknown) |
static std::map< nonneg int, VariableValue > | getVariableValues (const Token *tok) |
static VariableValue | operator! (VariableValue v) |
static bool | operator== (const VariableValue &v, MathLib::bigint i) |
static bool | operator!= (const VariableValue &v, MathLib::bigint i) |
static void | conditionAlwaysTrueOrFalse (const Token *tok, const std::map< nonneg int, VariableValue > &variableValue, bool *alwaysTrue, bool *alwaysFalse) |
static bool | isVariableUsed (const Token *tok, const Variable &var) |
static bool | astIsLhs (const Token *tok) |
static bool | astIsRhs (const Token *tok) |
static bool | isVoidCast (const Token *tok) |
static bool | isVariableUsage (const Settings &settings, const Token *vartok, MathLib::bigint *value) |
Variables | |
static const CWE | CWE_USE_OF_UNINITIALIZED_VARIABLE (457U) |
|
static |
Definition at line 1121 of file checkuninitvar.cpp.
References Token::astParent().
Referenced by CheckUninitVar::isVariableUsage().
|
static |
Definition at line 1126 of file checkuninitvar.cpp.
References Token::astParent().
Referenced by CheckUninitVar::isVariableUsage().
|
static |
Definition at line 292 of file checkuninitvar.cpp.
References Token::astOperand1(), Token::astOperand2(), Token::getKnownIntValue(), Token::hasKnownIntValue(), Token::isComparisonOp(), Token::isName(), Token::str(), MathLib::toBigNumber(), and Token::varId().
Referenced by CheckUninitVar::checkScopeForVariable().
|
static |
Definition at line 62 of file checkuninitvar.cpp.
References Token::astOperand1(), Token::astOperand2(), Token::astParent(), Token::isCast(), Token::isUnaryOp(), Token::Match(), and Token::str().
Referenced by CheckUninitVar::isFunctionParUsage().
|
static |
Definition at line 85 of file checkuninitvar.cpp.
References Token::astOperand2(), Token::getKnownIntValue(), Token::hasKnownIntValue(), Token::isBinaryOp(), Token::link(), Token::Match(), Token::next(), Token::previous(), Token::scope(), Token::str(), and Token::varId().
Referenced by CheckUninitVar::checkScope(), and CheckUninitVar::checkStruct().
|
static |
Definition at line 1673 of file checkuninitvar.cpp.
References CheckUninitVar::isVariableUsage(), and Settings::library.
Definition at line 377 of file checkuninitvar.cpp.
References Token::astOperand1(), Token::astOperand2(), Token::astParent(), Variable::declarationId(), Variable::isArray(), Token::isConstOp(), Token::Match(), Token::str(), and Token::varId().
Referenced by CheckUninitVar::checkRhs(), and CheckUninitVar::checkScopeForVariable().
|
static |
Definition at line 1131 of file checkuninitvar.cpp.
References Token::isCast(), ValueType::pointer, Token::simpleMatch(), ValueType::type, and Token::valueType().
Referenced by CheckUninitVar::isVariableUsage(), and CheckUninitVar::valueFlowUninit().
|
static |
Definition at line 278 of file checkuninitvar.cpp.
References VariableValue::notEqual.
|
static |
Definition at line 287 of file checkuninitvar.cpp.
References VariableValue::notEqual, and VariableValue::value.
|
static |
Definition at line 283 of file checkuninitvar.cpp.
References VariableValue::notEqual, and VariableValue::value.
|
static |