Cppcheck
|
#include "ctu.h"
#include "astutils.h"
#include "errortypes.h"
#include "settings.h"
#include "symboldatabase.h"
#include "token.h"
#include "tokenize.h"
#include "tokenlist.h"
#include "utils.h"
#include <algorithm>
#include <cstdint>
#include <cstring>
#include <iterator>
#include <sstream>
#include <utility>
#include "xml.h"
Go to the source code of this file.
Functions | |
static std::string | readAttrString (const tinyxml2::XMLElement *e, const char *attr, bool *error) |
static long long | readAttrInt (const tinyxml2::XMLElement *e, const char *attr, bool *error) |
static int | isCallFunction (const Scope *scope, int argnr, const Token *&tok) |
static std::list< std::pair< const Token *, MathLib::bigint > > | getUnsafeFunction (const Settings &settings, const Scope *scope, int argnr, bool(*isUnsafeUsage)(const Settings &settings, const Token *argtok, MathLib::bigint *value)) |
static bool | findPath (const std::string &callId, nonneg int callArgNr, MathLib::bigint unsafeValue, CTU::FileInfo::InvalidValueType invalidValue, const std::map< std::string, std::list< const CTU::FileInfo::CallBase * >> &callsMap, const CTU::FileInfo::CallBase *path[10], int index, bool warning) |
Variables | |
static constexpr char | ATTR_CALL_ID [] = "call-id" |
static constexpr char | ATTR_CALL_FUNCNAME [] = "call-funcname" |
static constexpr char | ATTR_CALL_ARGNR [] = "call-argnr" |
static constexpr char | ATTR_CALL_ARGEXPR [] = "call-argexpr" |
static constexpr char | ATTR_CALL_ARGVALUETYPE [] = "call-argvaluetype" |
static constexpr char | ATTR_CALL_ARGVALUE [] = "call-argvalue" |
static constexpr char | ATTR_WARNING [] = "warning" |
static constexpr char | ATTR_LOC_FILENAME [] = "file" |
static constexpr char | ATTR_LOC_LINENR [] = "line" |
static constexpr char | ATTR_LOC_COLUMN [] = "col" |
static constexpr char | ATTR_INFO [] = "info" |
static constexpr char | ATTR_MY_ID [] = "my-id" |
static constexpr char | ATTR_MY_ARGNR [] = "my-argnr" |
static constexpr char | ATTR_MY_ARGNAME [] = "my-argname" |
static constexpr char | ATTR_VALUE [] = "value" |
|
static |
Definition at line 497 of file ctu.cpp.
References ValueFlow::Value::BUFFER_SIZE, CTU::FileInfo::bufferOverflow, CTU::FileInfo::CallBase::callArgNr, ValueFlow::Value::INT, CTU::maxCtuDepth, CTU::FileInfo::null, CTU::FileInfo::uninit, ValueFlow::Value::UNINIT, and warning.
Referenced by CTU::FileInfo::getErrorPath().
|
static |
Definition at line 440 of file ctu.cpp.
References Scope::bodyEnd, Scope::bodyStart, Variable::declarationId(), Token::findmatch(), Scope::function, Function::getArgumentVar(), Variable::isArrayOrPointer(), Variable::isReference(), isUnsafeUsage(), isVariableChanged(), Token::Match(), Token::next(), ValueType::pointer, and Variable::valueType().
Referenced by CTU::getUnsafeUsage().
Definition at line 279 of file ctu.cpp.
References Token::astOperand1(), Scope::bodyEnd, Scope::bodyStart, Scope::function, Function::getArgumentVar(), Variable::isPointer(), Token::link(), Token::Match(), Token::next(), Token::previous(), and Token::str().
Referenced by CTU::getFileInfo().
|
static |
Definition at line 178 of file ctu.cpp.
References error.
Referenced by CTU::FileInfo::CallBase::loadBaseFromXml(), CTU::FileInfo::FunctionCall::loadFromXml(), CTU::FileInfo::NestedCall::loadFromXml(), and CTU::loadUnsafeUsageListFromXml().
|
static |
Definition at line 170 of file ctu.cpp.
References error.
Referenced by CTU::FileInfo::CallBase::loadBaseFromXml(), CTU::FileInfo::FunctionCall::loadFromXml(), CTU::FileInfo::NestedCall::loadFromXml(), and CTU::loadUnsafeUsageListFromXml().
|
staticconstexpr |
Definition at line 45 of file ctu.cpp.
Referenced by CTU::FileInfo::FunctionCall::loadFromXml(), and CTU::FileInfo::FunctionCall::toXmlString().
|
staticconstexpr |
Definition at line 44 of file ctu.cpp.
Referenced by CTU::FileInfo::CallBase::loadBaseFromXml(), and CTU::FileInfo::CallBase::toBaseXmlString().
|
staticconstexpr |
Definition at line 47 of file ctu.cpp.
Referenced by CTU::FileInfo::FunctionCall::loadFromXml(), and CTU::FileInfo::FunctionCall::toXmlString().
|
staticconstexpr |
Definition at line 46 of file ctu.cpp.
Referenced by CTU::FileInfo::FunctionCall::loadFromXml(), and CTU::FileInfo::FunctionCall::toXmlString().
|
staticconstexpr |
Definition at line 43 of file ctu.cpp.
Referenced by CTU::FileInfo::CallBase::loadBaseFromXml(), and CTU::FileInfo::CallBase::toBaseXmlString().
|
staticconstexpr |
Definition at line 42 of file ctu.cpp.
Referenced by CTU::FileInfo::CallBase::loadBaseFromXml(), and CTU::FileInfo::CallBase::toBaseXmlString().
|
staticconstexpr |
Definition at line 52 of file ctu.cpp.
Referenced by CTU::FileInfo::FunctionCall::loadFromXml(), and CTU::FileInfo::FunctionCall::toXmlString().
|
staticconstexpr |
Definition at line 51 of file ctu.cpp.
Referenced by CTU::FileInfo::CallBase::loadBaseFromXml(), CTU::FileInfo::FunctionCall::loadFromXml(), CTU::loadUnsafeUsageListFromXml(), CTU::FileInfo::CallBase::toBaseXmlString(), CTU::FileInfo::UnsafeUsage::toString(), and CTU::FileInfo::FunctionCall::toXmlString().
|
staticconstexpr |
Definition at line 49 of file ctu.cpp.
Referenced by CTU::FileInfo::CallBase::loadBaseFromXml(), CTU::FileInfo::FunctionCall::loadFromXml(), CTU::loadUnsafeUsageListFromXml(), CTU::FileInfo::CallBase::toBaseXmlString(), CTU::FileInfo::UnsafeUsage::toString(), and CTU::FileInfo::FunctionCall::toXmlString().
|
staticconstexpr |
Definition at line 50 of file ctu.cpp.
Referenced by CTU::FileInfo::CallBase::loadBaseFromXml(), CTU::FileInfo::FunctionCall::loadFromXml(), CTU::loadUnsafeUsageListFromXml(), CTU::FileInfo::CallBase::toBaseXmlString(), CTU::FileInfo::UnsafeUsage::toString(), and CTU::FileInfo::FunctionCall::toXmlString().
|
staticconstexpr |
Definition at line 55 of file ctu.cpp.
Referenced by CTU::loadUnsafeUsageListFromXml(), and CTU::FileInfo::UnsafeUsage::toString().
|
staticconstexpr |
Definition at line 54 of file ctu.cpp.
Referenced by CTU::FileInfo::NestedCall::loadFromXml(), CTU::loadUnsafeUsageListFromXml(), CTU::FileInfo::UnsafeUsage::toString(), and CTU::FileInfo::NestedCall::toXmlString().
|
staticconstexpr |
Definition at line 53 of file ctu.cpp.
Referenced by CTU::FileInfo::NestedCall::loadFromXml(), CTU::loadUnsafeUsageListFromXml(), CTU::FileInfo::UnsafeUsage::toString(), and CTU::FileInfo::NestedCall::toXmlString().
|
staticconstexpr |
Definition at line 56 of file ctu.cpp.
Referenced by CTU::loadUnsafeUsageListFromXml(), and CTU::FileInfo::UnsafeUsage::toString().
|
staticconstexpr |
Definition at line 48 of file ctu.cpp.
Referenced by CTU::FileInfo::FunctionCall::loadFromXml(), and CTU::FileInfo::FunctionCall::toXmlString().