Cppcheck
Public Member Functions | Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
SymbolDatabase Class Reference

#include <symboldatabase.h>

Public Member Functions

 SymbolDatabase (Tokenizer &tokenizer, const Settings &settings, ErrorLogger &errorLogger)
 
 ~SymbolDatabase ()
 
const TypefindVariableType (const Scope *start, const Token *typeTok) const
 find a variable type if it's a user defined type More...
 
const FunctionfindFunction (const Token *tok) const
 find a function More...
 
const ScopefindScopeByName (const std::string &name) const
 For unit testing only. More...
 
const TypefindType (const Token *startTok, const Scope *startScope, bool lookOutside=false) const
 
TypefindType (const Token *startTok, Scope *startScope, bool lookOutside=false)
 
const ScopefindScope (const Token *tok, const Scope *startScope) const
 
ScopefindScope (const Token *tok, Scope *startScope)
 
bool isVarId (nonneg int varid) const
 
const VariablegetVariableFromVarId (nonneg int varId) const
 
const std::vector< const Variable * > & variableList () const
 
void debugMessage (const Token *tok, const std::string &type, const std::string &msg) const
 output a debug message More...
 
void returnImplicitIntError (const Token *tok) const
 
void printOut (const char *title=nullptr) const
 
void printVariable (const Variable *var, const char *indent) const
 
void printXml (std::ostream &out) const
 
void validate () const
 
void setValueTypeInTokenList (bool reportDebugWarnings, Token *tokens=nullptr)
 Set valuetype in provided tokenlist. More...
 
nonneg int sizeOfType (const Token *type) const
 Calculates sizeof value for given type. More...
 
void setArrayDimensionsUsingValueFlow ()
 Set array dimensions when valueflow analysis is completed. More...
 
void clangSetVariables (const std::vector< const Variable * > &variableList)
 
void createSymbolDatabaseExprIds ()
 

Public Attributes

std::list< ScopescopeList
 Information about all namespaces/classes/structures. More...
 
std::vector< const Scope * > functionScopes
 Fast access to function scopes. More...
 
std::vector< const Scope * > classAndStructScopes
 Fast access to class and struct scopes. More...
 
std::list< TypetypeList
 Fast access to types. More...
 

Private Types

using MemberIdMap = std::map< unsigned int, unsigned int >
 
using VarIdMap = std::map< unsigned int, MemberIdMap >
 

Private Member Functions

void createSymbolDatabaseFindAllScopes ()
 
void createSymbolDatabaseClassInfo ()
 
void createSymbolDatabaseVariableInfo ()
 
void createSymbolDatabaseCopyAndMoveConstructors ()
 
void createSymbolDatabaseFunctionScopes ()
 
void createSymbolDatabaseClassAndStructScopes ()
 
void createSymbolDatabaseFunctionReturnTypes ()
 
void createSymbolDatabaseNeedInitialization ()
 
void createSymbolDatabaseVariableSymbolTable ()
 
void createSymbolDatabaseSetScopePointers ()
 
void createSymbolDatabaseSetFunctionPointers (bool firstPass)
 
void createSymbolDatabaseSetVariablePointers ()
 
void createSymbolDatabaseSetTypePointers ()
 
void createSymbolDatabaseSetSmartPointerType ()
 
void createSymbolDatabaseEnums ()
 
void createSymbolDatabaseEscapeFunctions ()
 
void createSymbolDatabaseIncompleteVars ()
 
void debugSymbolDatabase () const
 
void addClassFunction (Scope *&scope, const Token *&tok, const Token *argStart)
 
FunctionaddGlobalFunction (Scope *&scope, const Token *&tok, const Token *argStart, const Token *funcStart)
 
void addNewFunction (Scope *&scope, const Token *&tok)
 
bool isFunction (const Token *tok, const Scope *outerScope, const Token *&funcStart, const Token *&argStart, const Token *&declEnd) const
 
const TypefindTypeInNested (const Token *startTok, const Scope *startScope) const
 
const ScopefindNamespace (const Token *tok, const Scope *scope) const
 
void fixVarId (VarIdMap &varIds, const Token *vartok, Token *membertok, const Variable *membervar)
 
const EnumeratorfindEnumerator (const Token *tok, std::set< std::string > &tokensThatAreNotEnumeratorValues) const
 
void setValueType (Token *tok, const ValueType &valuetype, const SourceLocation &loc=SourceLocation::current())
 
void setValueType (Token *tok, const Variable &var, const SourceLocation &loc=SourceLocation::current())
 
void setValueType (Token *tok, const Enumerator &enumerator, const SourceLocation &loc=SourceLocation::current())
 
void validateExecutableScopes () const
 
void validateVariables () const
 Check variable list, e.g. More...
 

Static Private Member Functions

static FunctionaddGlobalFunctionDecl (Scope *&scope, const Token *tok, const Token *argStart, const Token *funcStart)
 
static FunctionfindFunctionInScope (const Token *func, const Scope *ns, const std::string &path, nonneg int path_length)
 
static const TypefindVariableTypeInBase (const Scope *scope, const Token *typeTok)
 
static bool isReservedName (const Token *tok)
 Whether the token is a keyword as defined in http://en.cppreference.com/w/c/keyword and http://en.cppreference.com/w/cpp/keyword. More...
 

Private Attributes

TokenizermTokenizer
 
const SettingsmSettings
 
ErrorLoggermErrorLogger
 
std::vector< const Variable * > mVariableList
 variable symbol table More...
 
std::list< TypemBlankTypes
 list for missing types More...
 
ValueType::Sign mDefaultSignedness
 

Friends

class TestSymbolDatabase
 
class Scope
 
class Function
 

Detailed Description

Definition at line 1319 of file symboldatabase.h.

Member Typedef Documentation

◆ MemberIdMap

using SymbolDatabase::MemberIdMap = std::map<unsigned int, unsigned int>
private

Definition at line 1448 of file symboldatabase.h.

◆ VarIdMap

using SymbolDatabase::VarIdMap = std::map<unsigned int, MemberIdMap>
private

Definition at line 1449 of file symboldatabase.h.

Constructor & Destructor Documentation

◆ SymbolDatabase()

SymbolDatabase::SymbolDatabase ( Tokenizer tokenizer,
const Settings settings,
ErrorLogger errorLogger 
)

◆ ~SymbolDatabase()

SymbolDatabase::~SymbolDatabase ( )

Member Function Documentation

◆ addClassFunction()

void SymbolDatabase::addClassFunction ( Scope *&  scope,
const Token *&  tok,
const Token argStart 
)
private

◆ addGlobalFunction()

Function * SymbolDatabase::addGlobalFunction ( Scope *&  scope,
const Token *&  tok,
const Token argStart,
const Token funcStart 
)
private

◆ addGlobalFunctionDecl()

Function * SymbolDatabase::addGlobalFunctionDecl ( Scope *&  scope,
const Token tok,
const Token argStart,
const Token funcStart 
)
staticprivate

◆ addNewFunction()

void SymbolDatabase::addNewFunction ( Scope *&  scope,
const Token *&  tok 
)
private

◆ clangSetVariables()

void SymbolDatabase::clangSetVariables ( const std::vector< const Variable * > &  variableList)

Definition at line 2147 of file symboldatabase.cpp.

References mVariableList, and variableList().

◆ createSymbolDatabaseClassAndStructScopes()

void SymbolDatabase::createSymbolDatabaseClassAndStructScopes ( )
private

Definition at line 895 of file symboldatabase.cpp.

References classAndStructScopes, and scopeList.

Referenced by SymbolDatabase().

◆ createSymbolDatabaseClassInfo()

void SymbolDatabase::createSymbolDatabaseClassInfo ( )
private

◆ createSymbolDatabaseCopyAndMoveConstructors()

void SymbolDatabase::createSymbolDatabaseCopyAndMoveConstructors ( )
private

◆ createSymbolDatabaseEnums()

void SymbolDatabase::createSymbolDatabaseEnums ( )
private

◆ createSymbolDatabaseEscapeFunctions()

void SymbolDatabase::createSymbolDatabaseEscapeFunctions ( )
private

◆ createSymbolDatabaseExprIds()

void SymbolDatabase::createSymbolDatabaseExprIds ( )

◆ createSymbolDatabaseFindAllScopes()

void SymbolDatabase::createSymbolDatabaseFindAllScopes ( )
private
Todo:
check entire qualification for match
Todo:
handle friend functions

Definition at line 140 of file symboldatabase.cpp.

References Function::access, addClassFunction(), Scope::addEnum(), addGlobalFunction(), addGlobalFunctionDecl(), addNewFunction(), Scope::addVariable(), Token::astParent(), Scope::bodyEnd, Scope::checkVariable(), Scope::classDef, Scope::className, Type::classScope, Scope::definedType, Scope::definedTypesMap, Scope::eCatch, Scope::eClass, Scope::eDo, Scope::eElse, Scope::eEnum, Scope::eFor, Scope::eGlobal, Scope::eIf, emptyString, Scope::eNamespace, Scope::eStruct, Scope::eSwitch, Scope::eTry, Scope::eUnconditional, Scope::eWhile, Scope::findInNestedListRecursive(), findLambdaEndToken(), findNamespace(), findScope(), findType(), Type::friendList, Scope::functionMap, Function::functionScope, TokenList::getSourceFilePath(), Type::initBaseInfo(), Token::isC(), Scope::isClassOrStruct(), Scope::isClassOrStructOrUnion(), Token::isCpp(), isEnumDefinition(), Scope::isExecutable(), isExecutableScope(), isFunction(), Tokenizer::isFunctionHead(), Token::isKeyword(), Token::isSimplifiedTypedef(), Token::isUpperCaseName(), Token::link(), Token::linkAt(), Tokenizer::list, Local, Token::Match(), mErrorLogger, mSettings, mTokenizer, Type::name(), Type::FriendInfo::nameEnd, Type::FriendInfo::nameStart, Function::nestedIn, Scope::nestedIn, Scope::nestedList, Token::next(), Token::previous(), Private, Token::progressValue(), Protected, Public, ErrorLogger::reportProgress(), Scope::UsingInfo::scope, scopeList, Scope::setBodyStartEnd(), Token::simpleMatch(), Scope::UsingInfo::start, Token::str(), Token::strAt(), succeeds(), InternalError::SYNTAX, Tokenizer::syntaxError(), Throw, Token::tokAt(), Function::token, Tokenizer::tokens(), Type::FriendInfo::type, Scope::type, typeList, and Scope::usingList.

Referenced by SymbolDatabase().

◆ createSymbolDatabaseFunctionReturnTypes()

void SymbolDatabase::createSymbolDatabaseFunctionReturnTypes ( )
private

◆ createSymbolDatabaseFunctionScopes()

void SymbolDatabase::createSymbolDatabaseFunctionScopes ( )
private

Definition at line 886 of file symboldatabase.cpp.

References Scope::eFunction, functionScopes, and scopeList.

Referenced by SymbolDatabase().

◆ createSymbolDatabaseIncompleteVars()

void SymbolDatabase::createSymbolDatabaseIncompleteVars ( )
private

◆ createSymbolDatabaseNeedInitialization()

void SymbolDatabase::createSymbolDatabaseNeedInitialization ( )
private

◆ createSymbolDatabaseSetFunctionPointers()

void SymbolDatabase::createSymbolDatabaseSetFunctionPointers ( bool  firstPass)
private

◆ createSymbolDatabaseSetScopePointers()

void SymbolDatabase::createSymbolDatabaseSetScopePointers ( )
private

◆ createSymbolDatabaseSetSmartPointerType()

void SymbolDatabase::createSymbolDatabaseSetSmartPointerType ( )
private

◆ createSymbolDatabaseSetTypePointers()

void SymbolDatabase::createSymbolDatabaseSetTypePointers ( )
private

◆ createSymbolDatabaseSetVariablePointers()

void SymbolDatabase::createSymbolDatabaseSetVariablePointers ( )
private

◆ createSymbolDatabaseVariableInfo()

void SymbolDatabase::createSymbolDatabaseVariableInfo ( )
private

Definition at line 840 of file symboldatabase.cpp.

References mSettings, and scopeList.

Referenced by SymbolDatabase().

◆ createSymbolDatabaseVariableSymbolTable()

void SymbolDatabase::createSymbolDatabaseVariableSymbolTable ( )
private

◆ debugMessage()

void SymbolDatabase::debugMessage ( const Token tok,
const std::string &  type,
const std::string &  msg 
) const

◆ debugSymbolDatabase()

void SymbolDatabase::debugSymbolDatabase ( ) const
private

◆ findEnumerator()

const Enumerator * SymbolDatabase::findEnumerator ( const Token tok,
std::set< std::string > &  tokensThatAreNotEnumeratorValues 
) const
private

◆ findFunction()

const Function * SymbolDatabase::findFunction ( const Token tok) const

◆ findFunctionInScope()

Function * SymbolDatabase::findFunctionInScope ( const Token func,
const Scope ns,
const std::string &  path,
nonneg int  path_length 
)
staticprivate

◆ findNamespace()

const Scope * SymbolDatabase::findNamespace ( const Token tok,
const Scope scope 
) const
private

Definition at line 6380 of file symboldatabase.cpp.

References findScope(), and Scope::nestedIn.

Referenced by createSymbolDatabaseFindAllScopes().

◆ findScope() [1/2]

const Scope * SymbolDatabase::findScope ( const Token tok,
const Scope startScope 
) const

◆ findScope() [2/2]

Scope* SymbolDatabase::findScope ( const Token tok,
Scope startScope 
)
inline

Definition at line 1362 of file symboldatabase.h.

◆ findScopeByName()

const Scope * SymbolDatabase::findScopeByName ( const std::string &  name) const

For unit testing only.

Definition at line 6067 of file symboldatabase.cpp.

References scopeList.

◆ findType() [1/2]

const Type * SymbolDatabase::findType ( const Token startTok,
const Scope startScope,
bool  lookOutside = false 
) const

◆ findType() [2/2]

Type* SymbolDatabase::findType ( const Token startTok,
Scope startScope,
bool  lookOutside = false 
)
inline

Definition at line 1356 of file symboldatabase.h.

◆ findTypeInNested()

const Type * SymbolDatabase::findTypeInNested ( const Token startTok,
const Scope startScope 
) const
private

◆ findVariableType()

const Type * SymbolDatabase::findVariableType ( const Scope start,
const Token typeTok 
) const

◆ findVariableTypeInBase()

const Type * SymbolDatabase::findVariableTypeInBase ( const Scope scope,
const Token typeTok 
)
staticprivate

◆ fixVarId()

void SymbolDatabase::fixVarId ( VarIdMap varIds,
const Token vartok,
Token membertok,
const Variable membervar 
)
private

◆ getVariableFromVarId()

const Variable* SymbolDatabase::getVariableFromVarId ( nonneg int  varId) const
inline

◆ isFunction()

bool SymbolDatabase::isFunction ( const Token tok,
const Scope outerScope,
const Token *&  funcStart,
const Token *&  argStart,
const Token *&  declEnd 
) const
private

◆ isReservedName()

bool SymbolDatabase::isReservedName ( const Token tok)
staticprivate

◆ isVarId()

bool SymbolDatabase::isVarId ( nonneg int  varid) const
inline

Definition at line 1367 of file symboldatabase.h.

◆ printOut()

void SymbolDatabase::printOut ( const char *  title = nullptr) const

◆ printVariable()

void SymbolDatabase::printVariable ( const Variable var,
const char *  indent 
) const

◆ printXml()

void SymbolDatabase::printXml ( std::ostream &  out) const

◆ returnImplicitIntError()

void SymbolDatabase::returnImplicitIntError ( const Token tok) const

◆ setArrayDimensionsUsingValueFlow()

void SymbolDatabase::setArrayDimensionsUsingValueFlow ( )

◆ setValueType() [1/3]

void SymbolDatabase::setValueType ( Token tok,
const Enumerator enumerator,
const SourceLocation loc = SourceLocation::current() 
)
private

◆ setValueType() [2/3]

void SymbolDatabase::setValueType ( Token tok,
const ValueType valuetype,
const SourceLocation loc = SourceLocation::current() 
)
private

◆ setValueType() [3/3]

void SymbolDatabase::setValueType ( Token tok,
const Variable var,
const SourceLocation loc = SourceLocation::current() 
)
private

◆ setValueTypeInTokenList()

void SymbolDatabase::setValueTypeInTokenList ( bool  reportDebugWarnings,
Token tokens = nullptr 
)

Set valuetype in provided tokenlist.

Definition at line 7334 of file symboldatabase.cpp.

References MathLib::abs(), astFunctionYield(), Token::astOperand1(), Token::astOperand2(), Token::astParent(), ValueType::constness, ValueType::container, ValueType::containerTypeToken, Standards::cpp, Standards::CPP20, createSymbolDatabaseSetFunctionPointers(), createSymbolDatabaseSetVariablePointers(), TokenList::createTokens(), debugMessage(), Settings::debugwarnings, Scope::definedType, Library::detectContainerOrIterator(), Library::detectSmartPointer(), Token::eChar, Scope::eFunction, Scope::eLambda, Token::eLogicalOp, Library::Container::END_ITERATOR, Token::enumerator(), Token::eString, ValueType::fromLibraryType(), TokenList::front(), Scope::function, Token::function(), Library::Container::functions, Library::getArgIteratorInfo(), getArguments(), getClassScope(), getFunction(), getOperatorFunction(), Token::isBoolean(), Token::isCast(), Token::isCChar(), Scope::isClassOrStruct(), Token::isCMultiChar(), Token::isComparisonOp(), Function::isConst(), Token::isCpp(), MathLib::isDec(), Scope::isExecutable(), MathLib::isFloat(), MathLib::isInt(), ValueType::isIntegral(), Platform::isIntValue(), isIterator(), Token::isKeyword(), isLambdaCaptureList(), Token::isLong(), Platform::isLongLongValue(), Platform::isLongValue(), Token::isNumber(), Token::isSigned(), Library::isSmartPointer(), Token::isStandardType(), Token::isUnsigned(), Token::isUtf16(), Token::isUtf32(), Token::isUtf8(), Function::isVolatile(), Library::ArgumentChecks::IteratorInfo::it, Library::Container::ITERATOR, Settings::library, Token::link(), Tokenizer::list, Token::Match(), mDefaultSignedness, mSettings, mTokenizer, Scope::nestedIn, Token::next(), nonneg, ValueType::originalTypeName, ValueType::parseDecl(), parsedecl(), Settings::platform, ValueType::pointer, Token::previous(), ValueType::RECORD, Function::retDef, Library::returnValueType(), Token::scope(), setValueType(), Token::setValueType(), sign(), ValueType::sign, Token::simpleMatch(), TokenList::simplifyPlatformTypes(), TokenList::simplifyStdType(), ValueType::smartPointer, Library::smartPointers, ValueType::smartPointerType, ValueType::smartPointerTypeToken, Settings::standards, Library::Container::START_ITERATOR, Token::str(), MathLib::toBigUNumber(), Token::tokAt(), Function::tokenDef, Token::tokType(), Platform::type, Scope::type, ValueType::type, Token::type(), ValueType::typeFromString(), ValueType::typeScope, ValueType::UNKNOWN_INT, ValueType, Token::valueType(), Token::variable(), and ValueType::volatileness.

Referenced by Tokenizer::simplifyTokens1(), and SymbolDatabase().

◆ sizeOfType()

nonneg int SymbolDatabase::sizeOfType ( const Token type) const

Calculates sizeof value for given type.

Parameters
typeToken which will contain e.g. "int", "*", or string.
Returns
sizeof for given type, or 0 if it can't be calculated.

Definition at line 6439 of file symboldatabase.cpp.

References mSettings, mTokenizer, Settings::platform, Platform::sizeof_int, Tokenizer::sizeOfType(), and Token::type().

◆ validate()

void SymbolDatabase::validate ( ) const

◆ validateExecutableScopes()

void SymbolDatabase::validateExecutableScopes ( ) const
private

◆ validateVariables()

void SymbolDatabase::validateVariables ( ) const
private

Check variable list, e.g.

variables w/o scope

Definition at line 2124 of file symboldatabase.cpp.

References InternalError::INTERNAL, Variable::isArgument(), mVariableList, Variable::nameToken(), and Variable::scope().

Referenced by validate().

◆ variableList()

const std::vector<const Variable *>& SymbolDatabase::variableList ( ) const
inline

Friends And Related Function Documentation

◆ Function

friend class Function
friend

Definition at line 1413 of file symboldatabase.h.

◆ Scope

friend class Scope
friend

Definition at line 1412 of file symboldatabase.h.

◆ TestSymbolDatabase

friend class TestSymbolDatabase
friend

Definition at line 1320 of file symboldatabase.h.

Member Data Documentation

◆ classAndStructScopes

std::vector<const Scope*> SymbolDatabase::classAndStructScopes

◆ functionScopes

std::vector<const Scope*> SymbolDatabase::functionScopes

Fast access to function scopes.

Definition at line 1329 of file symboldatabase.h.

Referenced by CheckCondition::alwaysTrueFalse(), CheckBufferOverrun::argumentSize(), CheckNullPointer::arithmetic(), CheckBufferOverrun::arrayIndexThenCheck(), CheckAutoVariables::assignFunctionArg(), CheckAutoVariables::autoVariables(), CheckBufferOverrun::bufferOverflow(), CheckLeakAutoVar::check(), CheckMemoryLeakNoVar::check(), CheckOther::checkAccessOfMovedVariable(), CheckBool::checkAssignBoolToFloat(), CheckBool::checkAssignBoolToPointer(), CheckCondition::checkAssignmentInCondition(), CheckBool::checkBitwiseOnBoolean(), CheckBoost::checkBoostForeachModification(), CheckOther::checkCastIntToCharAndBack(), CheckOther::checkCharVariable(), CheckOther::checkComparePointers(), CheckCondition::checkCompareValueOutOfTypeRange(), CheckOther::checkComparisonFunctionIsAlwaysTrueOrFalse(), CheckBool::checkComparisonOfBoolExpressionWithInt(), CheckBool::checkComparisonOfBoolWithBool(), CheckBool::checkComparisonOfBoolWithInt(), CheckBool::checkComparisonOfFuncReturningBool(), CheckIO::checkCoutCerrMisusage(), CheckCondition::checkDuplicateConditionalAssign(), CheckOther::checkDuplicateExpression(), CheckOther::checkEvaluationOrder(), CheckIO::checkFileUsage(), CheckStl::checkFindInsert(), CheckOther::checkFuncArgNamesDifferent(), CheckUnusedVar::checkFunctionVariableUsage(), CheckFunctions::checkIgnoredReturnValue(), CheckOther::checkIncompleteArrayFill(), CheckCondition::checkIncorrectLogicOperator(), CheckString::checkIncorrectStringCompare(), CheckBool::checkIncrementBoolean(), CheckOther::checkInvalidFree(), CheckOther::checkKnownArgument(), CheckOther::checkKnownPointerToBool(), CheckType::checkLongCast(), CheckFunctions::checkMathFunctions(), CheckClass::checkMemset(), CheckFunctions::checkMissingReturn(), CheckOther::checkMisusedScopedObject(), CheckCondition::checkModuloAlwaysTrueFalse(), CheckStl::checkMutexes(), CheckOther::checkOverlappingWrite(), CheckCondition::checkPointerAdditionResultNotNull(), CheckFunctions::checkProhibitedFunctions(), CheckMemoryLeakInFunction::checkReallocUsage(), CheckOther::checkRedundantAssignment(), CheckClass::checkSelfInitialization(), CheckOther::checkSignOfUnsignedVariable(), CheckSizeof::checkSizeofForArrayParameter(), CheckSizeof::checkSizeofForNumericParameter(), CheckSizeof::checkSizeofForPointerSize(), CheckString::checkSuspiciousStringCompare(), CheckOther::checkUnreachableCode(), CheckOther::checkUnusedLabel(), CheckOther::checkVarFuncNullUB(), CheckAutoVariables::checkVarLifetime(), CheckClass::checkVirtualFunctionCallInConstructor(), CheckIO::checkWrongPrintfScanfArguments(), CheckOther::clarifyCalculation(), CheckCondition::clarifyCondition(), CheckOther::clarifyStatement(), Summaries::create(), createSymbolDatabaseExprIds(), createSymbolDatabaseFunctionScopes(), createSymbolDatabaseVariableSymbolTable(), clangimport::AstNode::createTokensFunctionDecl(), CheckExceptionSafety::deallocThrow(), CheckExceptionSafety::destructors(), CheckStl::eraseIteratorOutOfBounds(), CheckClass::initializationListUsage(), CheckStl::invalidContainer(), CheckFunctions::invalidFunctionUsage(), CheckOther::invalidPointerCast(), CheckIO::invalidScanf(), CheckStl::knownEmptyContainer(), CheckFunctions::memsetInvalid2ndParam(), CheckFunctions::memsetZeroBytes(), CheckStl::mismatchingContainerIterator(), CheckStl::mismatchingContainers(), CheckBufferOverrun::negativeArraySize(), CheckStl::negativeIndex(), CheckExceptionSafety::nothrowThrows(), CheckNullPointer::nullConstantDereference(), CheckBufferOverrun::objectIndex(), CheckStl::outOfBounds(), CheckStl::outOfBoundsIndexExpression(), CheckString::overlappingStrcmp(), CheckUnusedFunctions::parseTokens(), Check64BitPortability::pointerassignment(), CheckPostfixOperator::postfixOperator(), CheckExceptionSafety::rethrowNoCurrentException(), CheckFunctions::returnLocalStdMove(), CheckBool::returnValueOfFunctionReturningBool(), CheckStl::size(), CheckString::sprintfOverlappingData(), CheckString::stringLiteralWrite(), CheckBufferOverrun::stringNotZeroTerminated(), CheckString::strPlusChar(), ConditionHandler::traverseCondition(), CheckExceptionSafety::unhandledExceptionSpecification(), CheckStl::uselessCalls(), CheckStl::useStlAlgorithm(), CheckVaarg::va_start_argument(), validateExecutableScopes(), valueFlowAfterAssign(), valueFlowAfterMove(), valueFlowAfterSwap(), valueFlowConditionExpressions(), valueFlowContainerSize(), valueFlowDynamicBufferSize(), valueFlowFunctionDefaultParameter(), valueFlowSafeFunctions(), valueFlowSubFunction(), valueFlowSymbolic(), valueFlowSymbolicInfer(), valueFlowSymbolicOperators(), CheckUninitVar::valueFlowUninit(), and CheckOther::warningOldStylePointerCast().

◆ mBlankTypes

std::list<Type> SymbolDatabase::mBlankTypes
private

list for missing types

Definition at line 1476 of file symboldatabase.h.

Referenced by createSymbolDatabaseNeedInitialization().

◆ mDefaultSignedness

ValueType::Sign SymbolDatabase::mDefaultSignedness
private

Definition at line 1478 of file symboldatabase.h.

Referenced by setValueType(), setValueTypeInTokenList(), and SymbolDatabase().

◆ mErrorLogger

ErrorLogger& SymbolDatabase::mErrorLogger
private

◆ mSettings

const Settings& SymbolDatabase::mSettings
private

◆ mTokenizer

Tokenizer& SymbolDatabase::mTokenizer
private

◆ mVariableList

std::vector<const Variable *> SymbolDatabase::mVariableList
private

◆ scopeList

std::list<Scope> SymbolDatabase::scopeList

Information about all namespaces/classes/structures.

Definition at line 1326 of file symboldatabase.h.

Referenced by addClassFunction(), addNewFunction(), CheckUninitVar::check(), CheckExceptionSafety::checkCatchExceptionByValue(), CheckStl::checkDereferenceInvalidIterator(), CheckOther::checkDuplicateBranch(), CheckExceptionSafety::checkRethrowCopy(), CheckOther::checkShadowVariables(), CheckUnusedVar::checkStructMemberUsage(), CheckOther::checkSuspiciousCaseInSwitch(), CheckOther::checkSuspiciousSemicolon(), CheckClass::constructors(), clangimport::AstNode::createScope(), createSymbolDatabaseClassAndStructScopes(), createSymbolDatabaseClassInfo(), createSymbolDatabaseCopyAndMoveConstructors(), createSymbolDatabaseEnums(), createSymbolDatabaseEscapeFunctions(), createSymbolDatabaseExprIds(), createSymbolDatabaseFindAllScopes(), createSymbolDatabaseFunctionReturnTypes(), createSymbolDatabaseFunctionScopes(), createSymbolDatabaseNeedInitialization(), createSymbolDatabaseSetFunctionPointers(), createSymbolDatabaseSetScopePointers(), createSymbolDatabaseSetSmartPointerType(), createSymbolDatabaseVariableInfo(), createSymbolDatabaseVariableSymbolTable(), clangimport::AstNode::createTokensFunctionDecl(), CheckCondition::duplicateCondition(), CheckStl::erase(), findEnumerator(), findFunction(), findScope(), findScopeByName(), findType(), findTypeInNested(), findVariableType(), CTU::getFileInfo(), CTU::getUnsafeUsage(), CheckStl::if_find(), CheckStl::missingComparison(), CheckCondition::multiCondition(), CheckCondition::multiCondition2(), clangimport::parseClangAstDump(), CheckBool::pointerArithBool(), printOut(), printXml(), CheckOther::redundantBitwiseOperationInSwitchError(), CheckStl::redundantCondition(), setValues(), CheckStl::stlOutOfBounds(), CheckStl::string_c_str(), CheckFunctions::useStandardLibrary(), valueFlowEnumValue(), valueFlowForLoop(), and valueFlowSwitchVariable().

◆ typeList

std::list<Type> SymbolDatabase::typeList

The documentation for this class was generated from the following files: