Cppcheck
Functions | Variables
ctu.cpp File Reference
#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"
 

Function Documentation

◆ findPath()

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 
)
static

◆ getUnsafeFunction()

static std::list<std::pair<const Token *, MathLib::bigint> > getUnsafeFunction ( const Settings settings,
const Scope scope,
int  argnr,
bool(*)(const Settings &settings, const Token *argtok, MathLib::bigint *value)  isUnsafeUsage 
)
static

◆ isCallFunction()

static int isCallFunction ( const Scope scope,
int  argnr,
const Token *&  tok 
)
static

◆ readAttrInt()

static long long readAttrInt ( const tinyxml2::XMLElement *  e,
const char *  attr,
bool *  error 
)
static

◆ readAttrString()

static std::string readAttrString ( const tinyxml2::XMLElement *  e,
const char *  attr,
bool *  error 
)
static

Variable Documentation

◆ ATTR_CALL_ARGEXPR

constexpr char ATTR_CALL_ARGEXPR[] = "call-argexpr"
staticconstexpr

◆ ATTR_CALL_ARGNR

constexpr char ATTR_CALL_ARGNR[] = "call-argnr"
staticconstexpr

◆ ATTR_CALL_ARGVALUE

constexpr char ATTR_CALL_ARGVALUE[] = "call-argvalue"
staticconstexpr

◆ ATTR_CALL_ARGVALUETYPE

constexpr char ATTR_CALL_ARGVALUETYPE[] = "call-argvaluetype"
staticconstexpr

◆ ATTR_CALL_FUNCNAME

constexpr char ATTR_CALL_FUNCNAME[] = "call-funcname"
staticconstexpr

◆ ATTR_CALL_ID

constexpr char ATTR_CALL_ID[] = "call-id"
staticconstexpr

◆ ATTR_INFO

constexpr char ATTR_INFO[] = "info"
staticconstexpr

◆ ATTR_LOC_COLUMN

constexpr char ATTR_LOC_COLUMN[] = "col"
staticconstexpr

◆ ATTR_LOC_FILENAME

constexpr char ATTR_LOC_FILENAME[] = "file"
staticconstexpr

◆ ATTR_LOC_LINENR

constexpr char ATTR_LOC_LINENR[] = "line"
staticconstexpr

◆ ATTR_MY_ARGNAME

constexpr char ATTR_MY_ARGNAME[] = "my-argname"
staticconstexpr

◆ ATTR_MY_ARGNR

constexpr char ATTR_MY_ARGNR[] = "my-argnr"
staticconstexpr

◆ ATTR_MY_ID

constexpr char ATTR_MY_ID[] = "my-id"
staticconstexpr

◆ ATTR_VALUE

constexpr char ATTR_VALUE[] = "value"
staticconstexpr

◆ ATTR_WARNING

constexpr char ATTR_WARNING[] = "warning"
staticconstexpr