Cppcheck
Functions | Variables
checknullpointer.cpp File Reference
#include "checknullpointer.h"
#include "astutils.h"
#include "ctu.h"
#include "errorlogger.h"
#include "errortypes.h"
#include "library.h"
#include "mathlib.h"
#include "settings.h"
#include "symboldatabase.h"
#include "token.h"
#include "tokenize.h"
#include "valueflow.h"
#include <algorithm>
#include <cctype>
#include <map>
#include <set>
#include <vector>

Go to the source code of this file.

Functions

static bool checkNullpointerFunctionCallPlausibility (const Function *func, unsigned int arg)
 
static bool isNullablePointer (const Token *tok)
 
static std::string arithmeticTypeString (const Token *tok)
 
static bool isUnsafeUsage (const Settings &settings, const Token *vartok, MathLib::bigint *value)
 

Variables

static const CWE CWE_NULL_POINTER_DEREFERENCE (476U)
 
static const CWE CWE_INCORRECT_CALCULATION (682U)
 

Function Documentation

◆ arithmeticTypeString()

static std::string arithmeticTypeString ( const Token tok)
static

◆ checkNullpointerFunctionCallPlausibility()

static bool checkNullpointerFunctionCallPlausibility ( const Function func,
unsigned int  arg 
)
static

◆ isNullablePointer()

static bool isNullablePointer ( const Token tok)
static

◆ isUnsafeUsage()

static bool isUnsafeUsage ( const Settings settings,
const Token vartok,
MathLib::bigint value 
)
static

Variable Documentation

◆ CWE_INCORRECT_CALCULATION

const CWE CWE_INCORRECT_CALCULATION(682U) ( 682U  )
static

◆ CWE_NULL_POINTER_DEREFERENCE

const CWE CWE_NULL_POINTER_DEREFERENCE(476U) ( 476U  )
static