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

#include <symboldatabase.h>

Classes

struct  UsingInfo
 

Public Types

enum  ScopeType {
  eGlobal , eClass , eStruct , eUnion ,
  eNamespace , eFunction , eIf , eElse ,
  eFor , eWhile , eDo , eSwitch ,
  eUnconditional , eTry , eCatch , eLambda ,
  eEnum
}
 

Public Member Functions

 Scope (const SymbolDatabase *check_, const Token *classDef_, const Scope *nestedIn_)
 
 Scope (const SymbolDatabase *check_, const Token *classDef_, const Scope *nestedIn_, ScopeType type_, const Token *start_)
 
void setBodyStartEnd (const Token *start)
 
bool isAnonymous () const
 
const Enumerator * findEnumerator (const std::string &name) const
 
bool isNestedIn (const Scope *outer) const
 
bool isClassOrStruct () const
 
bool isClassOrStructOrUnion () const
 
bool isExecutable () const
 
bool isLoopScope () const
 
bool isLocal () const
 
bool hasInlineOrLambdaFunction () const
 
const Function * findFunction (const Token *tok, bool requireConst=false) const
 find a function More...
 
const Scope * findRecordInNestedList (const std::string &name, bool isC=false) const
 
Scope * findRecordInNestedList (const std::string &name, bool isC=false)
 
const Type * findType (const std::string &name) const
 
Type * findType (const std::string &name)
 
Scope * findInNestedListRecursive (const std::string &name)
 find if name is in nested list More...
 
void addVariable (const Token *token_, const Token *start_, const Token *end_, AccessControl access_, const Type *type_, const Scope *scope_, const Settings &settings)
 
void getVariableList (const Settings &settings)
 initialize varlist More...
 
const Function * getDestructor () const
 
void addFunction (Function func)
 
AccessControl defaultAccess () const
 
const Token * checkVariable (const Token *tok, AccessControl varaccess, const Settings &settings)
 check if statement is variable declaration and add it if it is More...
 
const Variable * getVariable (const std::string &varname) const
 get variable from name More...
 
const Token * addEnum (const Token *tok)
 
const Scope * findRecordInBase (const std::string &name) const
 
std::vector< const Scope * > findAssociatedScopes () const
 

Static Public Member Functions

static Function * nestedInFunction (const Scope *scope)
 

Public Attributes

const SymbolDatabase * check {}
 
std::string className
 
const Token * classDef {}
 class/struct/union/namespace token More...
 
const Token * bodyStart {}
 '{' token More...
 
const Token * bodyEnd {}
 '}' token More...
 
std::list< Function > functionList
 
std::multimap< std::string, const Function * > functionMap
 
std::list< Variable > varlist
 
const Scope * nestedIn {}
 
std::vector< Scope * > nestedList
 
nonneg int numConstructors {}
 
nonneg int numCopyOrMoveConstructors {}
 
std::vector< UsingInfo > usingList
 
ScopeType type {}
 
Type * definedType {}
 
std::map< std::string, Type * > definedTypesMap
 
std::vector< const Token * > bodyStartList
 
const Scope * functionOf {}
 scope this function belongs to More...
 
Function * function {}
 function info for this function More...
 
const Token * enumType {}
 
bool enumClass {}
 
std::vector< Enumerator > enumeratorList
 

Private Member Functions

bool isVariableDeclaration (const Token *const tok, const Token *&vartok, const Token *&typetok) const
 helper function for getVariableList() More...
 
void findFunctionInBase (const std::string &name, nonneg int args, std::vector< const Function * > &matches) const
 
void getVariableList (const Settings &settings, const Token *start, const Token *end)
 initialize varlist More...
 

Friends

class TestSymbolDatabase
 

Detailed Description

Definition at line 1014 of file symboldatabase.h.

Member Enumeration Documentation

◆ ScopeType

Enumerator
eGlobal 
eClass 
eStruct 
eUnion 
eNamespace 
eFunction 
eIf 
eElse 
eFor 
eWhile 
eDo 
eSwitch 
eUnconditional 
eTry 
eCatch 
eLambda 
eEnum 

Definition at line 1024 of file symboldatabase.h.

Constructor & Destructor Documentation

◆ Scope() [1/2]

Scope::Scope ( const SymbolDatabase *  check_,
const Token *  classDef_,
const Scope *  nestedIn_ 
)

◆ Scope() [2/2]

Scope::Scope ( const SymbolDatabase *  check_,
const Token *  classDef_,
const Scope *  nestedIn_,
ScopeType  type_,
const Token *  start_ 
)

Definition at line 4695 of file symboldatabase.cpp.

References setBodyStartEnd().

Member Function Documentation

◆ addEnum()

const Token * Scope::addEnum ( const Token *  tok)

◆ addFunction()

void Scope::addFunction ( Function  func)
inline

Definition at line 1153 of file symboldatabase.h.

References Token::str(), and Function::tokenDef.

Referenced by SymbolDatabase::addGlobalFunctionDecl().

◆ addVariable()

void Scope::addVariable ( const Token *  token_,
const Token *  start_,
const Token *  end_,
AccessControl  access_,
const Type *  type_,
const Scope *  scope_,
const Settings &  settings 
)

Definition at line 4760 of file symboldatabase.cpp.

References varlist.

Referenced by checkVariable(), and SymbolDatabase::createSymbolDatabaseFindAllScopes().

◆ checkVariable()

const Token * Scope::checkVariable ( const Token *  tok,
AccessControl  varaccess,
const Settings &  settings 
)

◆ defaultAccess()

AccessControl Scope::defaultAccess ( ) const

◆ findAssociatedScopes()

std::vector< const Scope * > Scope::findAssociatedScopes ( ) const

◆ findEnumerator()

const Enumerator* Scope::findEnumerator ( const std::string &  name) const
inline

Definition at line 1069 of file symboldatabase.h.

Referenced by SymbolDatabase::findEnumerator().

◆ findFunction()

const Function * Scope::findFunction ( const Token *  tok,
bool  requireConst = false 
) const

◆ findFunctionInBase()

void Scope::findFunctionInBase ( const std::string &  name,
nonneg int  args,
std::vector< const Function * > &  matches 
) const
private

◆ findInNestedListRecursive()

Scope * Scope::findInNestedListRecursive ( const std::string &  name)

find if name is in nested list

Parameters
namename of nested scope

Definition at line 6152 of file symboldatabase.cpp.

References findInNestedListRecursive(), and nestedList.

Referenced by SymbolDatabase::createSymbolDatabaseFindAllScopes(), and findInNestedListRecursive().

◆ findRecordInBase()

const Scope * Scope::findRecordInBase ( const std::string &  name) const

◆ findRecordInNestedList() [1/2]

Scope * Scope::findRecordInNestedList ( const std::string &  name,
bool  isC = false 
)

Definition at line 6108 of file symboldatabase.cpp.

◆ findRecordInNestedList() [2/2]

const Scope * Scope::findRecordInNestedList ( const std::string &  name,
bool  isC = false 
) const

◆ findType() [1/2]

Type * Scope::findType ( const std::string &  name)

Definition at line 6145 of file symboldatabase.cpp.

◆ findType() [2/2]

const Type * Scope::findType ( const std::string &  name) const

◆ getDestructor()

const Function * Scope::getDestructor ( ) const

◆ getVariable()

const Variable * Scope::getVariable ( const std::string &  varname) const

◆ getVariableList() [1/2]

void Scope::getVariableList ( const Settings &  settings)

initialize varlist

Definition at line 4770 of file symboldatabase.cpp.

References bodyStartList, check, eGlobal, SymbolDatabase::mTokenizer, Tokenizer::tokens(), and type.

◆ getVariableList() [2/2]

void Scope::getVariableList ( const Settings &  settings,
const Token *  start,
const Token *  end 
)
private

◆ hasInlineOrLambdaFunction()

bool Scope::hasInlineOrLambdaFunction ( ) const

◆ isAnonymous()

bool Scope::isAnonymous ( ) const
inline

Definition at line 1064 of file symboldatabase.h.

References startsWith().

◆ isClassOrStruct()

bool Scope::isClassOrStruct ( ) const
inline

◆ isClassOrStructOrUnion()

bool Scope::isClassOrStructOrUnion ( ) const
inline

◆ isExecutable()

bool Scope::isExecutable ( ) const
inline

◆ isLocal()

bool Scope::isLocal ( ) const
inline

◆ isLoopScope()

bool Scope::isLoopScope ( ) const
inline

◆ isNestedIn()

bool Scope::isNestedIn ( const Scope *  outer) const
inline

Definition at line 1076 of file symboldatabase.h.

References nestedIn.

Referenced by valueFlowLifetime().

◆ isVariableDeclaration()

bool Scope::isVariableDeclaration ( const Token *const  tok,
const Token *&  vartok,
const Token *&  typetok 
) const
private

helper function for getVariableList()

Parameters
tokpointer to token to check
vartokpopulated with pointer to the variable token, if found
typetokpopulated with pointer to the type token, if found
Returns
true if tok points to a variable declaration, false otherwise

Definition at line 5018 of file symboldatabase.cpp.

References check, Standards::cpp, Standards::CPP11, eCatch, Token::isCpp(), Token::link(), Token::linkAt(), Token::Match(), SymbolDatabase::mSettings, Token::next(), Token::simpleMatch(), skipPointers(), skipPointersAndQualifiers(), skipScopeIdentifiers(), Settings::standards, Token::str(), Token::strAt(), Token::tokAt(), type, and Token::varId().

Referenced by checkVariable().

◆ nestedInFunction()

static Function* Scope::nestedInFunction ( const Scope *  scope)
inlinestatic

Definition at line 1087 of file symboldatabase.h.

References eFunction, function, nestedIn, and type.

Referenced by findExpression(), isDanglingSubFunction(), and valueFlowForward().

◆ setBodyStartEnd()

void Scope::setBodyStartEnd ( const Token *  start)
inline

Friends And Related Function Documentation

◆ TestSymbolDatabase

friend class TestSymbolDatabase
friend

Definition at line 1016 of file symboldatabase.h.

Member Data Documentation

◆ bodyEnd

const Token* Scope::bodyEnd {}

'}' token

Definition at line 1033 of file symboldatabase.h.

Referenced by SymbolDatabase::addNewFunction(), ConditionHandler::afterCondition(), CheckCondition::alwaysTrueFalse(), CheckBufferOverrun::argumentSize(), CheckNullPointer::arithmetic(), CheckBufferOverrun::arrayIndex(), CheckBufferOverrun::arrayIndexThenCheck(), CheckAssert::assertWithSideEffects(), CheckAutoVariables::assignFunctionArg(), CheckAutoVariables::autoVariables(), CheckBufferOverrun::bufferOverflow(), 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(), CheckClass::checkConstFunc(), CheckOther::checkConstVariable(), CheckIO::checkCoutCerrMisusage(), CheckOther::checkDuplicateBranch(), CheckCondition::checkDuplicateConditionalAssign(), CheckOther::checkDuplicateExpression(), CheckOther::checkEvaluationOrder(), CheckIO::checkFileUsage(), CheckStl::checkFindInsert(), CheckMemoryLeakNoVar::checkForUnreleasedInputArgument(), CheckMemoryLeakNoVar::checkForUnsafeArgAlloc(), CheckMemoryLeakNoVar::checkForUnusedReturnValue(), CheckUnusedVar::checkFunctionVariableUsage(), CheckUnusedVar::checkFunctionVariableUsage_iterateScopes(), 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(), CheckOther::checkOverlappingWrite(), CheckCondition::checkPointerAdditionResultNotNull(), CheckFunctions::checkProhibitedFunctions(), CheckMemoryLeakInFunction::checkReallocUsage(), CheckOther::checkRedundantAssignment(), CheckOther::checkRedundantCopy(), CheckExceptionSafety::checkRethrowCopy(), CheckUninitVar::checkScope(), CheckLeakAutoVar::checkScope(), CheckOther::checkSignOfUnsignedVariable(), CheckSizeof::checkSizeofForArrayParameter(), CheckSizeof::checkSizeofForNumericParameter(), CheckSizeof::checkSizeofForPointerSize(), CheckUninitVar::checkStruct(), CheckUnusedVar::checkStructMemberUsage(), CheckMemoryLeakStructMember::checkStructVariable(), CheckOther::checkSuspiciousCaseInSwitch(), CheckString::checkSuspiciousStringCompare(), CheckClass::checkThisUseAfterFree(), CheckClass::checkThisUseAfterFreeRecursive(), CheckOther::checkUnreachableCode(), CheckOther::checkUnusedLabel(), CheckClass::checkUselessOverride(), CheckOther::checkVarFuncNullUB(), CheckAutoVariables::checkVarLifetime(), CheckIO::checkWrongPrintfScanfArguments(), CheckOther::clarifyCalculation(), CheckCondition::clarifyCondition(), CheckOther::clarifyStatement(), CheckClass::copyconstructors(), Summaries::create(), clangimport::AstNode::createScope(), SymbolDatabase::createSymbolDatabaseExprIds(), SymbolDatabase::createSymbolDatabaseFindAllScopes(), clangimport::AstNode::createTokens(), clangimport::AstNode::createTokensFunctionDecl(), CheckExceptionSafety::deallocThrow(), CheckExceptionSafety::destructors(), CheckStl::eraseCheckLoopVar(), fillProgramMemoryFromConditions(), findAllUsages(), findExpression(), findNextTokenFromBreak(), Function::findReturns(), followVariableExpression(), PathAnalysis::forward(), CheckLeakAutoVar::functionCall(), CheckMemoryLeak::functionReturnType(), getEndOfVarScope(), getEnumType(), CTU::getFileInfo(), CheckClass::getFileInfo(), getFunctionUsage(), getSingleFunctionCall(), getSingleReturnVar(), getUnsafeFunction(), CheckClass::hasAllocation(), CheckClass::hasAllocationInIfScope(), CheckClass::hasAssignSelf(), CheckClass::initializationListUsage(), CheckClass::initializeVarList(), CheckStl::invalidContainer(), CheckFunctions::invalidFunctionUsage(), CheckOther::invalidPointerCast(), CheckIO::invalidScanf(), isAliased(), isCallFunction(), isContainerSizeChangedByFunction(), isDeadScope(), CheckUnusedVar::isFunctionWithoutSideEffects(), CheckMemoryLeakStructMember::isMalloc(), isSimpleExpr(), isVariableChanged(), CheckStl::iterators(), CheckFunctions::memsetInvalid2ndParam(), CheckFunctions::memsetZeroBytes(), CheckStl::mismatchingContainerIterator(), CheckStl::mismatchingContainers(), CheckStl::missingComparison(), CheckCondition::multiCondition2(), CheckBufferOverrun::negativeArraySize(), CheckStl::negativeIndex(), CheckNullPointer::nullConstantDereference(), CheckBufferOverrun::objectIndex(), CheckString::overlappingStrcmp(), CheckBool::pointerArithBool(), Check64BitPortability::pointerassignment(), CheckPostfixOperator::postfixOperator(), CheckClass::privateFunctions(), CheckOther::redundantBitwiseOperationInSwitchError(), CheckLeakAutoVar::ret(), CheckBool::returnValueOfFunctionReturningBool(), CheckStl::size(), CheckString::sprintfOverlappingData(), CheckStl::stlBoundaries(), CheckStl::stlOutOfBounds(), CheckStl::string_c_str(), CheckString::stringLiteralWrite(), CheckBufferOverrun::stringNotZeroTerminated(), CheckString::strPlusChar(), ConditionHandler::traverseCondition(), CheckExceptionSafety::unhandledExceptionSpecification(), CheckStl::uselessCalls(), CheckVaarg::va_start_argument(), valueFlowAfterAssign(), valueFlowAfterMove(), valueFlowAfterSwap(), valueFlowConditionExpressions(), valueFlowContainerSize(), valueFlowDynamicBufferSize(), valueFlowForLoopSimplifyAfter(), valueFlowForward(), valueFlowForwardLifetime(), valueFlowInjectParameter(), valueFlowSafeFunctions(), valueFlowSubFunction(), valueFlowSwitchVariable(), valueFlowSymbolic(), valueFlowSymbolicInfer(), valueFlowSymbolicOperators(), CheckUninitVar::valueFlowUninit(), valueFlowUninit(), CheckMemoryLeakInClass::variable(), variableIsUsedInScope(), and CheckOther::warningOldStylePointerCast().

◆ bodyStart

const Token* Scope::bodyStart {}

'{' token

Definition at line 1032 of file symboldatabase.h.

Referenced by CheckCondition::alwaysTrueFalse(), CheckBufferOverrun::argumentSize(), CheckNullPointer::arithmetic(), CheckBufferOverrun::arrayIndex(), CheckBufferOverrun::arrayIndexThenCheck(), CheckAssert::assertWithSideEffects(), CheckAutoVariables::assignFunctionArg(), CheckAutoVariables::autoVariables(), CheckBufferOverrun::bufferOverflow(), CheckLeakAutoVar::check(), CheckOther::checkAccessOfMovedVariable(), CheckBool::checkAssignBoolToFloat(), CheckBool::checkAssignBoolToPointer(), CheckCondition::checkAssignmentInCondition(), CheckBool::checkBitwiseOnBoolean(), CheckBoost::checkBoostForeachModification(), CheckOther::checkCastIntToCharAndBack(), CheckExceptionSafety::checkCatchExceptionByValue(), CheckOther::checkCharVariable(), CheckOther::checkComparePointers(), CheckCondition::checkCompareValueOutOfTypeRange(), CheckOther::checkComparisonFunctionIsAlwaysTrueOrFalse(), CheckBool::checkComparisonOfBoolExpressionWithInt(), CheckBool::checkComparisonOfBoolWithBool(), CheckBool::checkComparisonOfBoolWithInt(), CheckBool::checkComparisonOfFuncReturningBool(), CheckClass::checkConstFunc(), CheckOther::checkConstVariable(), CheckIO::checkCoutCerrMisusage(), CheckOther::checkDuplicateBranch(), CheckCondition::checkDuplicateConditionalAssign(), CheckOther::checkDuplicateExpression(), CheckOther::checkEvaluationOrder(), CheckIO::checkFileUsage(), CheckStl::checkFindInsert(), CheckMemoryLeakNoVar::checkForUnreleasedInputArgument(), CheckMemoryLeakNoVar::checkForUnsafeArgAlloc(), CheckMemoryLeakNoVar::checkForUnusedReturnValue(), checkFunctionUsage(), CheckUnusedVar::checkFunctionVariableUsage(), CheckUnusedVar::checkFunctionVariableUsage_iterateScopes(), CheckFunctions::checkIgnoredReturnValue(), CheckOther::checkIncompleteArrayFill(), CheckCondition::checkIncorrectLogicOperator(), CheckString::checkIncorrectStringCompare(), CheckBool::checkIncrementBoolean(), CheckOther::checkInnerScope(), CheckOther::checkInvalidFree(), CheckOther::checkKnownArgument(), CheckOther::checkKnownPointerToBool(), CheckType::checkLongCast(), CheckFunctions::checkMathFunctions(), CheckClass::checkMemset(), CheckOther::checkMisusedScopedObject(), CheckCondition::checkModuloAlwaysTrueFalse(), CheckOther::checkOverlappingWrite(), CheckCondition::checkPointerAdditionResultNotNull(), CheckFunctions::checkProhibitedFunctions(), CheckMemoryLeakInClass::checkPublicFunctions(), CheckMemoryLeakInFunction::checkReallocUsage(), CheckOther::checkRedundantAssignment(), CheckExceptionSafety::checkRethrowCopy(), CheckUninitVar::checkScope(), CheckLeakAutoVar::checkScope(), CheckClass::checkSelfInitialization(), CheckOther::checkSignOfUnsignedVariable(), CheckSizeof::checkSizeofForArrayParameter(), CheckSizeof::checkSizeofForNumericParameter(), CheckSizeof::checkSizeofForPointerSize(), CheckUninitVar::checkStruct(), CheckUnusedVar::checkStructMemberUsage(), CheckMemoryLeakStructMember::checkStructVariable(), CheckOther::checkSuspiciousCaseInSwitch(), CheckOther::checkSuspiciousSemicolon(), CheckString::checkSuspiciousStringCompare(), CheckClass::checkThisUseAfterFree(), CheckClass::checkThisUseAfterFreeRecursive(), CheckOther::checkUnreachableCode(), CheckOther::checkUnusedLabel(), CheckClass::checkUselessOverride(), CheckOther::checkVarFuncNullUB(), CheckAutoVariables::checkVarLifetime(), CheckAutoVariables::checkVarLifetimeScope(), CheckIO::checkWrongPrintfScanfArguments(), CheckOther::clarifyCalculation(), CheckCondition::clarifyCondition(), CheckOther::clarifyStatement(), CheckClass::constructors(), CheckClass::copyconstructors(), Summaries::create(), clangimport::AstNode::createScope(), SymbolDatabase::createSymbolDatabaseExprIds(), SymbolDatabase::createSymbolDatabaseSetFunctionPointers(), clangimport::AstNode::createTokensFunctionDecl(), CheckExceptionSafety::deallocThrow(), CheckExceptionSafety::destructors(), CheckStl::eraseCheckLoopVar(), findExpression(), Function::findReturns(), findStartToken(), CheckLeakAutoVar::functionCall(), CheckMemoryLeak::functionReturnType(), getEnumType(), CTU::getFileInfo(), CheckClass::getFileInfo(), getFunctionUsage(), getSingleFunctionCall(), getSingleReturnVar(), getUnsafeFunction(), getVariableChangedStart(), CheckClass::hasAllocation(), CheckClass::hasAssignSelf(), CheckClass::initializationListUsage(), CheckStl::invalidContainer(), CheckFunctions::invalidFunctionUsage(), CheckOther::invalidPointerCast(), CheckIO::invalidScanf(), isCallFunction(), isContainerSizeChangedByFunction(), CheckUnusedVar::isFunctionWithoutSideEffects(), isRangeForScope(), CheckUnusedVar::isRecordTypeWithoutSideEffects(), isScope(), CheckFunctions::memsetInvalid2ndParam(), CheckFunctions::memsetZeroBytes(), CheckStl::mismatchingContainerIterator(), CheckStl::mismatchingContainers(), CheckStl::missingComparison(), CheckCondition::multiCondition2(), CheckBufferOverrun::negativeArraySize(), CheckStl::negativeIndex(), CheckNullPointer::nullConstantDereference(), CheckBufferOverrun::objectIndex(), CheckClass::operatorEqRetRefThis(), CheckString::overlappingStrcmp(), Check64BitPortability::pointerassignment(), CheckPostfixOperator::postfixOperator(), CheckClass::privateFunctions(), CheckOther::redundantBitwiseOperationInSwitchError(), CheckLeakAutoVar::ret(), CheckBool::returnValueOfFunctionReturningBool(), ValueFlowPassRunner::setSkippedFunctions(), CheckStl::size(), CheckString::sprintfOverlappingData(), CheckStl::stlOutOfBounds(), CheckStl::string_c_str(), CheckString::stringLiteralWrite(), CheckBufferOverrun::stringNotZeroTerminated(), CheckString::strPlusChar(), ConditionHandler::traverseCondition(), CheckExceptionSafety::unhandledExceptionSpecification(), CheckStl::uselessCalls(), CheckVaarg::va_start_argument(), valueFlowAfterAssign(), valueFlowAfterMove(), valueFlowAfterSwap(), valueFlowConditionExpressions(), valueFlowContainerSize(), valueFlowDynamicBufferSize(), valueFlowForLoop(), valueFlowInjectParameter(), valueFlowSafeFunctions(), valueFlowSubFunction(), valueFlowSwitchVariable(), valueFlowSymbolic(), valueFlowSymbolicInfer(), valueFlowSymbolicOperators(), CheckUninitVar::valueFlowUninit(), valueFlowUninit(), CheckMemoryLeakInClass::variable(), and CheckOther::warningOldStylePointerCast().

◆ bodyStartList

std::vector<const Token *> Scope::bodyStartList

◆ check

const SymbolDatabase* Scope::check {}

◆ classDef

const Token* Scope::classDef {}

◆ className

std::string Scope::className

◆ definedType

Type* Scope::definedType {}

◆ definedTypesMap

std::map<std::string, Type*> Scope::definedTypesMap

◆ enumClass

bool Scope::enumClass {}

Definition at line 1053 of file symboldatabase.h.

Referenced by SymbolDatabase::findEnumerator(), Type::name(), and Scope().

◆ enumeratorList

std::vector<Enumerator> Scope::enumeratorList

◆ enumType

const Token* Scope::enumType {}

◆ function

Function* Scope::function {}

function info for this function

Definition at line 1049 of file symboldatabase.h.

Referenced by SymbolDatabase::addClassFunction(), SymbolDatabase::addGlobalFunction(), CheckOther::checkAccessOfMovedVariable(), CheckOther::checkConstVariable(), CheckIO::checkFileUsage(), CheckType::checkFloatToIntegerOverflow(), CheckOther::checkFuncArgNamesDifferent(), CheckFunctions::checkMissingReturn(), CheckUninitVar::checkScope(), CheckClass::checkSelfInitialization(), CheckOther::checkShadowVariables(), CheckClass::checkThisUseAfterFreeRecursive(), CheckAutoVariables::checkVarLifetime(), CheckAutoVariables::checkVarLifetimeScope(), CheckClass::checkVirtualFunctionCallInConstructor(), Summaries::create(), clangimport::AstNode::createTokensFunctionDecl(), CheckExceptionSafety::destructors(), exprDependsOnThis(), findFunction(), CTU::getFileInfo(), getUnsafeFunction(), CTU::getUnsafeUsage(), inBooleanFunction(), CheckClass::initializationListUsage(), isCallFunction(), isUniqueExpression(), ValueType::matchParameter(), nestedInFunction(), CheckExceptionSafety::nothrowThrows(), CheckNullPointer::nullConstantDereference(), CheckUnusedFunctions::parseTokens(), CheckOther::passedByValueError(), Check64BitPortability::pointerassignment(), CheckExceptionSafety::rethrowNoCurrentException(), CheckFunctions::returnLocalStdMove(), CheckBool::returnValueOfFunctionReturningBool(), SymbolDatabase::setValueTypeInTokenList(), CheckStl::string_c_str(), Token::typeDecl(), Token::typeOf(), CheckExceptionSafety::unhandledExceptionSpecification(), CheckVaarg::va_start_argument(), SymbolDatabase::validateExecutableScopes(), valueFlowAfterMove(), valueFlowFunctionDefaultParameter(), valueFlowInjectParameter(), valueFlowSafeFunctions(), valueFlowSubFunction(), and CheckOther::warningOldStylePointerCast().

◆ functionList

std::list<Function> Scope::functionList

◆ functionMap

std::multimap<std::string, const Function *> Scope::functionMap

◆ functionOf

const Scope* Scope::functionOf {}

◆ nestedIn

const Scope* Scope::nestedIn {}

◆ nestedList

std::vector<Scope *> Scope::nestedList

◆ numConstructors

nonneg int Scope::numConstructors {}

◆ numCopyOrMoveConstructors

nonneg int Scope::numCopyOrMoveConstructors {}

Definition at line 1040 of file symboldatabase.h.

Referenced by CheckClass::constructors().

◆ type

ScopeType Scope::type {}

Definition at line 1042 of file symboldatabase.h.

Referenced by SymbolDatabase::addClassFunction(), CheckExceptionSafety::checkCatchExceptionByValue(), CheckClass::checkConst(), CheckClass::checkCopyCtorAndEqOperator(), CheckStl::checkDereferenceInvalidIterator(), CheckOther::checkDuplicateBranch(), CheckClass::checkDuplInheritedMembersRecursive(), CheckClass::checkExplicitConstructors(), CheckType::checkFloatToIntegerOverflow(), CheckUnusedVar::checkFunctionVariableUsage_iterateScopes(), CheckOther::checkInnerScope(), CheckOther::checkOverlappingWrite(), CheckExceptionSafety::checkRethrowCopy(), CheckLeakAutoVar::checkScope(), CheckOther::checkShadowVariables(), CheckUninitVar::checkStruct(), CheckUnusedVar::checkStructMemberUsage(), CheckOther::checkSuspiciousCaseInSwitch(), CheckOther::checkSuspiciousSemicolon(), checkVariable(), CheckClass::constructors(), clangimport::AstNode::createScope(), SymbolDatabase::createSymbolDatabaseFindAllScopes(), SymbolDatabase::createSymbolDatabaseSetScopePointers(), clangimport::AstNode::createTokensFunctionDecl(), defaultAccess(), doAssignment(), CheckCondition::duplicateCondition(), CheckStl::erase(), fillProgramMemoryFromConditions(), SymbolDatabase::findEnumerator(), findFunctionOf(), findNextTokenFromBreak(), PathAnalysis::findOuterScope(), findShadowed(), SymbolDatabase::findType(), SymbolDatabase::findVariableType(), CTU::getFileInfo(), CheckClass::getFileInfo(), getFunctionScope(), getLoopScope(), ValueFlow::getSizeOf(), CTU::getUnsafeUsage(), getVariableList(), CheckStl::if_find(), inBooleanFunction(), Type::isClassType(), Type::isEnumType(), SymbolDatabase::isFunction(), CheckClass::isMemberVar(), isRangeForScope(), Function::isSafe(), CheckIO::ArgumentInfo::isStdVectorOrString(), Type::isStructType(), Type::isUnionType(), isVariableDeclaration(), isWithinScope(), CheckStl::missingComparison(), CheckCondition::multiCondition(), CheckCondition::multiCondition2(), nestedInFunction(), noMemberErrorMessage(), parsedecl(), CheckBool::pointerArithBool(), CheckOther::redundantBitwiseOperationInSwitchError(), CheckStl::redundantCondition(), CheckLeakAutoVar::ret(), Scope(), scopeToString(), Function::setFlags(), ValueFlowPassRunner::setSkippedFunctions(), SymbolDatabase::setValueTypeInTokenList(), CheckStl::stlOutOfBounds(), ValueType::str(), CheckStl::string_c_str(), SingleValueFlowAnalyzer::updateScope(), MultiValueFlowAnalyzer::updateScope(), valueFlowEnumValue(), valueFlowForLoop(), and valueFlowSwitchVariable().

◆ usingList

std::vector<UsingInfo> Scope::usingList

◆ varlist

std::list<Variable> Scope::varlist

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