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

Information about a member variable. More...

#include <symboldatabase.h>

Public Member Functions

 Variable (const Token *name_, const Token *start_, const Token *end_, nonneg int index_, AccessControl access_, const Type *type_, const Scope *scope_, const Settings &settings)
 
 Variable (const Token *name_, const std::string &clangType, const Token *typeStart, const Token *typeEnd, nonneg int index_, AccessControl access_, const Type *type_, const Scope *scope_)
 
 Variable (const Variable &var, const Scope *scope)
 
 Variable (const Variable &var)
 
 ~Variable ()
 
Variableoperator= (const Variable &var)
 
const TokennameToken () const
 Get name token. More...
 
const TokentypeStartToken () const
 Get type start token. More...
 
const TokentypeEndToken () const
 Get type end token. More...
 
const TokendeclEndToken () const
 Get end token of variable declaration E.g. More...
 
const std::string & name () const
 Get name string. More...
 
nonneg int declarationId () const
 Get declaration ID (varId used for variable in its declaration). More...
 
nonneg int index () const
 Get index of variable in declared order. More...
 
bool isPublic () const
 Is variable public. More...
 
bool isProtected () const
 Is variable protected. More...
 
bool isPrivate () const
 Is variable private. More...
 
bool isGlobal () const
 Is variable global. More...
 
bool isNamespace () const
 Is variable in a namespace. More...
 
bool isArgument () const
 Is variable a function argument. More...
 
bool isLocal () const
 Is variable local. More...
 
bool isMember () const
 Is variable a member of a user-defined type. More...
 
bool isMutable () const
 Is variable mutable. More...
 
bool isVolatile () const
 Is variable volatile. More...
 
bool isStatic () const
 Is variable static. More...
 
bool isExtern () const
 Is variable extern. More...
 
bool isConst () const
 Is variable const. More...
 
bool isThrow () const
 Is variable a throw type. More...
 
bool isClass () const
 Is variable a user defined (or unknown) type. More...
 
bool isArray () const
 Is variable an array. More...
 
bool isPointer () const
 Is pointer variable. More...
 
bool isPointerToArray () const
 Is variable a pointer to an array. More...
 
bool isPointerArray () const
 Is variable an array of pointers. More...
 
bool isArrayOrPointer () const
 Is array or pointer variable. More...
 
bool isReference () const
 Is reference variable. More...
 
bool isRValueReference () const
 Is reference variable. More...
 
bool isUnsigned () const
 Is variable unsigned. More...
 
bool hasDefault () const
 Does variable have a default value. More...
 
bool isInit () const
 Is variable initialized in its declaration. More...
 
const Typetype () const
 Get Type pointer of known type. More...
 
const ScopetypeScope () const
 Get Scope pointer of known type. More...
 
const Scopescope () const
 Get Scope pointer of enclosing scope. More...
 
const std::vector< Dimension > & dimensions () const
 Get array dimensions. More...
 
MathLib::bigint dimension (nonneg int index_) const
 Get array dimension length. More...
 
bool dimensionKnown (nonneg int index_) const
 Get array dimension known. More...
 
void setDimensions (const std::vector< Dimension > &dimensions_)
 
bool isStlType () const
 Checks if the variable is an STL type ('std::') E.g. More...
 
bool isStlStringType () const
 Checks if the variable is an STL type ('std::') E.g. More...
 
bool isStlStringViewType () const
 
bool isSmartPointer () const
 
const TypesmartPointerType () const
 
const TypeiteratorType () const
 
bool isStlType (const std::string &stlType) const
 Checks if the variable is of any of the STL types passed as arguments ('std::') E.g. More...
 
bool isStlType (const std::set< std::string > &stlTypes) const
 Checks if the variable is of any of the STL types passed as arguments ('std::') E.g. More...
 
bool isFloatingType () const
 Determine whether it's a floating number type. More...
 
bool isEnumType () const
 Determine whether it's an enumeration type. More...
 
bool isMaybeUnused () const
 
const ValueTypevalueType () const
 
void setValueType (const ValueType &valueType)
 
AccessControl accessControl () const
 
std::string getTypeName () const
 

Private Types

enum  {
  fIsMutable = (1 << 0) , fIsStatic = (1 << 1) , fIsConst = (1 << 2) , fIsExtern = (1 << 3) ,
  fIsClass = (1 << 4) , fIsArray = (1 << 5) , fIsPointer = (1 << 6) , fIsReference = (1 << 7) ,
  fIsRValueRef = (1 << 8) , fHasDefault = (1 << 9) , fIsStlType = (1 << 10) , fIsStlString = (1 << 11) ,
  fIsFloatType = (1 << 12) , fIsVolatile = (1 << 13) , fIsSmartPointer = (1 << 14) , fIsMaybeUnused = (1 << 15) ,
  fIsInit = (1 << 16)
}
 flags mask used to access specific bit. More...
 

Private Member Functions

bool getFlag (unsigned int flag_) const
 Get specified flag state. More...
 
void setFlag (unsigned int flag_, bool state_)
 Set specified flag state. More...
 
bool arrayDimensions (const Settings &settings, bool &isContainer)
 parse and save array dimension information More...
 
void type (const Type *t)
 Set Type pointer to known type. More...
 
void evaluate (const Settings &settings)
 fill in information, depending on Tokens given at instantiation More...
 

Private Attributes

const TokenmNameToken
 variable name token More...
 
const TokenmTypeStartToken
 variable type start token More...
 
const TokenmTypeEndToken
 variable type end token More...
 
nonneg int mIndex
 order declared More...
 
AccessControl mAccess
 what section is this variable declared in? More...
 
unsigned int mFlags
 flags More...
 
const TypemType
 pointer to user defined type info (for known types) More...
 
const ScopemScope
 pointer to scope this variable is in More...
 
const ValueTypemValueType {}
 
std::vector< DimensionmDimensions
 array dimensions More...
 

Friends

class SymbolDatabase
 

Detailed Description

Information about a member variable.

Definition at line 165 of file symboldatabase.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

flags mask used to access specific bit.

Enumerator
fIsMutable 
fIsStatic 

mutable variable

fIsConst 

static variable

fIsExtern 

const variable

fIsClass 

extern variable

fIsArray 

user defined type

fIsPointer 

array variable

fIsReference 

pointer variable

fIsRValueRef 

reference variable

fHasDefault 

rvalue reference variable

fIsStlType 

function argument with default value

fIsStlString 

STL type ('std::')

fIsFloatType 

std::string|wstring|basic_string<T>|u16string|u32string

fIsVolatile 

Floating point type.

fIsSmartPointer 

volatile

fIsMaybeUnused 

std::shared_ptr|unique_ptr

fIsInit 

marked [[maybe_unused]]

Definition at line 167 of file symboldatabase.h.

Constructor & Destructor Documentation

◆ Variable() [1/4]

Variable::Variable ( const Token name_,
const Token start_,
const Token end_,
nonneg int  index_,
AccessControl  access_,
const Type type_,
const Scope scope_,
const Settings settings 
)
inline

Definition at line 214 of file symboldatabase.h.

References evaluate().

◆ Variable() [2/4]

Variable::Variable ( const Token name_,
const std::string &  clangType,
const Token typeStart,
const Token typeEnd,
nonneg int  index_,
AccessControl  access_,
const Type type_,
const Scope scope_ 
)

◆ Variable() [3/4]

Variable::Variable ( const Variable var,
const Scope scope 
)

Definition at line 2234 of file symboldatabase.cpp.

References mScope, and scope().

◆ Variable() [4/4]

Variable::Variable ( const Variable var)

Definition at line 2240 of file symboldatabase.cpp.

◆ ~Variable()

Variable::~Variable ( )

Definition at line 2245 of file symboldatabase.cpp.

References mValueType.

Member Function Documentation

◆ accessControl()

AccessControl Variable::accessControl ( ) const
inline

Definition at line 647 of file symboldatabase.h.

Referenced by SymbolDatabase::printVariable().

◆ arrayDimensions()

bool Variable::arrayDimensions ( const Settings settings,
bool &  isContainer 
)
private

◆ declarationId()

nonneg int Variable::declarationId ( ) const
inline

◆ declEndToken()

const Token * Variable::declEndToken ( ) const

◆ dimension()

MathLib::bigint Variable::dimension ( nonneg int  index_) const
inline

◆ dimensionKnown()

bool Variable::dimensionKnown ( nonneg int  index_) const
inline

Get array dimension known.

Returns
length of dimension known

Definition at line 552 of file symboldatabase.h.

Referenced by valueFlowSetConstantValue().

◆ dimensions()

const std::vector<Dimension>& Variable::dimensions ( ) const
inline

◆ evaluate()

void Variable::evaluate ( const Settings settings)
private

◆ getFlag()

bool Variable::getFlag ( unsigned int  flag_) const
inlineprivate

Get specified flag state.

Parameters
flag_flag to get state of
Returns
true if flag set or false in flag not set

Definition at line 192 of file symboldatabase.h.

Referenced by isStlStringViewType().

◆ getTypeName()

std::string Variable::getTypeName ( ) const

◆ hasDefault()

bool Variable::hasDefault ( ) const
inline

◆ index()

nonneg int Variable::index ( ) const
inline

Get index of variable in declared order.

Returns
variable index

Definition at line 309 of file symboldatabase.h.

Referenced by SymbolDatabase::printVariable(), and CheckVaarg::va_start_argument().

◆ isArgument()

bool Variable::isArgument ( ) const
inline

◆ isArray()

bool Variable::isArray ( ) const
inline

◆ isArrayOrPointer()

bool Variable::isArrayOrPointer ( ) const
inline

◆ isClass()

bool Variable::isClass ( ) const
inline

◆ isConst()

bool Variable::isConst ( ) const
inline

◆ isEnumType()

bool Variable::isEnumType ( ) const
inline

Determine whether it's an enumeration type.

Returns
true if the type is known and it's an enumeration type

Definition at line 633 of file symboldatabase.h.

Referenced by CheckIO::ArgumentInfo::ArgumentInfo(), evaluate(), CheckClass::initializationListUsage(), isUniqueExpression(), and valueFlowSetConstantValue().

◆ isExtern()

bool Variable::isExtern ( ) const
inline

◆ isFloatingType()

bool Variable::isFloatingType ( ) const
inline

Determine whether it's a floating number type.

Returns
true if the type is known and it's a floating type (float, double and long double) or a pointer/array to it

Definition at line 625 of file symboldatabase.h.

Referenced by CheckClass::checkMemsetType(), and isUniqueExpression().

◆ isGlobal()

bool Variable::isGlobal ( ) const
inline

◆ isInit()

bool Variable::isInit ( ) const
inline

Is variable initialized in its declaration.

Returns
true if variable declaration contains initialization

Definition at line 504 of file symboldatabase.h.

Referenced by CheckOther::checkInnerScope(), CheckClass::constructors(), and valueFlowUninit().

◆ isLocal()

bool Variable::isLocal ( ) const
inline

◆ isMaybeUnused()

bool Variable::isMaybeUnused ( ) const
inline

Definition at line 637 of file symboldatabase.h.

Referenced by CheckUnusedVar::checkFunctionVariableUsage().

◆ isMember()

bool Variable::isMember ( ) const

Is variable a member of a user-defined type.

Returns
true if member, false if not or unknown

Definition at line 2274 of file symboldatabase.cpp.

References Scope::isClassOrStructOrUnion(), and mScope.

◆ isMutable()

bool Variable::isMutable ( ) const
inline

Is variable mutable.

Returns
true if mutable, false if not

Definition at line 380 of file symboldatabase.h.

Referenced by CheckClass::checkConstFunc(), and SymbolDatabase::printVariable().

◆ isNamespace()

bool Variable::isNamespace ( ) const
inline

Is variable in a namespace.

Returns
true if in a namespace, false if not

Definition at line 350 of file symboldatabase.h.

References Namespace.

◆ isPointer()

bool Variable::isPointer ( ) const
inline

Is pointer variable.

Returns
true if pointer, false otherwise

Definition at line 444 of file symboldatabase.h.

Referenced by CheckAssert::assertWithSideEffects(), bifurcateVariableChanged(), CheckBufferOverrun::bufferOverflow(), CheckMemoryLeakInClass::check(), CheckExceptionSafety::checkCatchExceptionByValue(), CheckUninitVar::checkExpr(), CheckUninitVar::checkIfForWhileHead(), CheckOther::checkIncompleteArrayFill(), CheckOther::checkInnerScope(), CheckUninitVar::checkLoopBodyRecursive(), CheckClass::checkMemset(), CheckClass::checkMemsetType(), checkNullpointerFunctionCallPlausibility(), CheckOther::checkRedundantPointerOp(), CheckUninitVar::checkRhs(), CheckUninitVar::checkScope(), CheckUninitVar::checkScopeForVariable(), CheckSizeof::checkSizeofForPointerSize(), CheckUnusedVar::checkStructMemberUsage(), CheckClass::constructors(), CheckOther::constVariableError(), CheckClass::copyconstructors(), SymbolDatabase::createSymbolDatabaseCopyAndMoveConstructors(), evaluate(), Scope::findFunction(), CheckBufferOverrun::getBufferSize(), CheckClass::initializationListUsage(), CheckClass::initializerListOrder(), isAliasOf(), isAutoVarArray(), isCallFunction(), isChar(), CheckUnusedVar::isFunctionWithoutSideEffects(), isLocalVarNoAutoDealloc(), isNonReferenceArg(), isParameterChanged(), CheckNullPointer::isPointerDeRef(), isPtrArg(), isRefPtrArg(), isUniqueExpression(), isVariableChanged(), isVariableCopyNeeded(), isWithoutSideEffects(), CheckCondition::multiCondition2(), needsInitialization(), nonLocal(), ExpressionAnalyzer::nonLocal(), CheckNullPointer::nullConstantDereference(), CheckBufferOverrun::objectIndex(), CheckPostfixOperator::postfixOperator(), SymbolDatabase::printVariable(), SymbolDatabase::printXml(), CheckStl::string_c_str(), CheckSizeof::suspiciousSizeofCalculation(), and valueFlowUninit().

◆ isPointerArray()

bool Variable::isPointerArray ( ) const

Is variable an array of pointers.

Returns
true if array or pointers, false otherwise

Definition at line 2278 of file symboldatabase.cpp.

References isArray(), nameToken(), Token::previous(), and Token::str().

Referenced by CheckMemoryLeakInClass::check(), CheckClass::constructors(), and CheckBufferOverrun::getBufferSize().

◆ isPointerToArray()

bool Variable::isPointerToArray ( ) const
inline

Is variable a pointer to an array.

Returns
true if pointer to array, false otherwise

Definition at line 452 of file symboldatabase.h.

Referenced by CheckUninitVar::checkScope().

◆ isPrivate()

bool Variable::isPrivate ( ) const
inline

Is variable private.

Returns
true if private, false if not

Definition at line 333 of file symboldatabase.h.

References Private.

Referenced by CheckMemoryLeakInClass::check(), CheckUnusedVar::checkStructMemberUsage(), CheckClass::constructors(), exprDependsOnThis(), and getDuplInheritedMembersRecursive().

◆ isProtected()

bool Variable::isProtected ( ) const
inline

Is variable protected.

Returns
true if protected, false if not

Definition at line 325 of file symboldatabase.h.

References Protected.

Referenced by exprDependsOnThis().

◆ isPublic()

bool Variable::isPublic ( ) const
inline

Is variable public.

Returns
true if public, false if not

Definition at line 317 of file symboldatabase.h.

References Public.

Referenced by exprDependsOnThis(), and valueFlowUninit().

◆ isReference()

bool Variable::isReference ( ) const
inline

Is reference variable.

Returns
true if reference, false otherwise

Definition at line 474 of file symboldatabase.h.

Referenced by CheckAssert::assertWithSideEffects(), CheckBufferOverrun::bufferOverflow(), CheckExceptionSafety::checkCatchExceptionByValue(), CheckOther::checkComparePointers(), CheckClass::checkConstFunc(), CheckOther::checkConstVariable(), CheckUnusedVar::checkFunctionVariableUsage(), CheckUnusedVar::checkFunctionVariableUsage_iterateScopes(), CheckClass::checkMemsetType(), CheckUninitVar::checkScope(), CheckSizeof::checkSizeofForArrayParameter(), CheckClass::checkUnsafeClassRefMember(), CheckAutoVariables::checkVarLifetimeScope(), CheckOther::constVariableError(), SymbolDatabase::createSymbolDatabaseCopyAndMoveConstructors(), SymbolDatabase::createSymbolDatabaseNeedInitialization(), evaluate(), followAllReferences(), getLifetimeTokens(), getUnsafeFunction(), CheckClass::initializationListUsage(), CheckClass::initializerListOrder(), isAutoVar(), isContainerSizeChangedByFunction(), isEscapedReference(), isInScope(), isLocalMutex(), isLocalVarNoAutoDealloc(), isNonReferenceArg(), isParameterChanged(), isRefPtrArg(), isVariableChanged(), isVariableMutableInInitializer(), CheckUninitVar::isVariableUsage(), isWithoutSideEffects(), CheckCondition::multiCondition2(), nonLocal(), ExpressionAnalyzer::nonLocal(), CheckBufferOverrun::objectIndex(), SymbolDatabase::printVariable(), SymbolDatabase::printXml(), CheckLeakAutoVar::ret(), ExpressionAnalyzer::setupExprVarIds(), CheckStl::string_c_str(), CheckVaarg::va_start_argument(), valueFlowInjectParameter(), valueFlowLifetimeClassConstructor(), valueFlowLifetimeFunction(), valueFlowLifetimeUserConstructor(), and valueFlowUninit().

◆ isRValueReference()

bool Variable::isRValueReference ( ) const
inline

◆ isSmartPointer()

bool Variable::isSmartPointer ( ) const
inline

◆ isStatic()

bool Variable::isStatic ( ) const
inline

◆ isStlStringType()

bool Variable::isStlStringType ( ) const
inline

Checks if the variable is an STL type ('std::') E.g.

: std::string s; ... sVar->isStlType() == true

Returns
true if it is an stl type and its type matches any of the types in 'stlTypes'

Definition at line 580 of file symboldatabase.h.

Referenced by checkVariableCallMatch(), evaluate(), Scope::findFunction(), CheckNullPointer::isPointerDeRef(), CheckNullPointer::nullConstantDereference(), CheckNullPointer::parseFunctionCall(), and CheckStl::string_c_str().

◆ isStlStringViewType()

bool Variable::isStlStringViewType ( ) const

◆ isStlType() [1/3]

bool Variable::isStlType ( ) const
inline

◆ isStlType() [2/3]

bool Variable::isStlType ( const std::set< std::string > &  stlTypes) const
inline

Checks if the variable is of any of the STL types passed as arguments ('std::') E.g.

: std::string s; ... const std::set<std::string> str = make_container< std::set<std::string> >() << "string" << "wstring"; sVar->isStlType(str) == true

Parameters
stlTypesset of stl types
Returns
true if it is an stl type and its type matches any of the types in 'stlTypes'

Definition at line 617 of file symboldatabase.h.

◆ isStlType() [3/3]

bool Variable::isStlType ( const std::string &  stlType) const
inline

Checks if the variable is of any of the STL types passed as arguments ('std::') E.g.

: std::string s; ... const char *str[] = {"string", "wstring"}; sVar->isStlType(str) == true

Parameters
stlTypestl type
Returns
true if it is an stl type and its type matches any of the types in 'stlTypes'

Definition at line 603 of file symboldatabase.h.

◆ isThrow()

bool Variable::isThrow ( ) const
inline

Is variable a throw type.

Returns
true if throw type, false if not

Definition at line 420 of file symboldatabase.h.

References Throw.

Referenced by CheckUninitVar::checkScope(), and valueFlowUninit().

◆ isUnsigned()

bool Variable::isUnsigned ( ) const

Is variable unsigned.

Returns
true only if variable is unsigned. if the sign is unknown, false is returned.

Definition at line 2283 of file symboldatabase.cpp.

References Token::isUnsigned(), mTypeStartToken, mValueType, and ValueType::sign.

◆ isVolatile()

bool Variable::isVolatile ( ) const
inline

Is variable volatile.

Returns
true if volatile, false if not

Definition at line 388 of file symboldatabase.h.

Referenced by followVariableExpression(), and SymbolDatabase::printXml().

◆ iteratorType()

const Type * Variable::iteratorType ( ) const

◆ name()

const std::string& Variable::name ( ) const
inline

◆ nameToken()

const Token* Variable::nameToken ( ) const
inline

Get name token.

Returns
name token

Definition at line 244 of file symboldatabase.h.

Referenced by accumulateStructMembers(), CheckBufferOverrun::argumentSize(), CheckBufferOverrun::argumentSizeError(), CheckMemoryLeakInClass::check(), CheckClass::checkConstFunc(), CheckOther::checkConstPointer(), CheckOther::checkConstVariable(), CheckOther::checkFuncArgNamesDifferent(), CheckUnusedVar::checkFunctionVariableUsage(), CheckUnusedVar::checkFunctionVariableUsage_iterateScopes(), CheckOther::checkInnerScope(), CheckUninitVar::checkRhs(), CheckUninitVar::checkScope(), CheckUninitVar::checkScopeForVariable(), CheckOther::checkShadowVariables(), CheckUnusedVar::checkStructMemberUsage(), CheckMemoryLeakStructMember::checkStructVariable(), CheckClass::checkThisUseAfterFreeRecursive(), CheckOther::checkVariableScope(), CheckAutoVariables::checkVarLifetimeScope(), CheckClass::constructors(), CheckOther::constVariableError(), SymbolDatabase::createSymbolDatabaseExprIds(), SymbolDatabase::createSymbolDatabaseVariableSymbolTable(), CheckStl::eraseCheckLoopVar(), findShadowed(), findStartToken(), findVarBound(), SymbolDatabase::fixVarId(), followAllReferences(), getLifetimeTokens(), MultiValueFlowAnalyzer::getProgramState(), getVariableChangedStart(), isContainerSizeChangedByFunction(), isExpression(), isIterator(), isLockGuard(), CheckMemoryLeakStructMember::isMalloc(), isMutex(), isPointerArray(), isStructuredBindingVariable(), isVariableChanged(), isVariableDecl(), CheckUninitVar::isVariableUsage(), ValueFlow::lifetimeMessage(), needsInitialization(), CheckStl::negativeIndex(), CheckOther::passedByValueError(), CheckPostfixOperator::postfixOperator(), SymbolDatabase::printVariable(), SymbolDatabase::printXml(), ExpressionAnalyzer::setupExprVarIds(), SymbolDatabase::setValueType(), skipLocalVars(), CheckStl::stlBoundaries(), Token::typeDecl(), SymbolDatabase::validateVariables(), valueFlowForwardAssign(), valueFlowForwardConst(), valueFlowFunctionDefaultParameter(), valueFlowFunctionReturn(), valueFlowInjectParameter(), valueFlowLifetime(), valueFlowSafeFunctions(), valueFlowSmartPointer(), and valueFlowUninit().

◆ operator=()

Variable & Variable::operator= ( const Variable var)

◆ scope()

const Scope* Variable::scope ( ) const
inline

◆ setDimensions()

void Variable::setDimensions ( const std::vector< Dimension > &  dimensions_)
inline

Definition at line 556 of file symboldatabase.h.

◆ setFlag()

void Variable::setFlag ( unsigned int  flag_,
bool  state_ 
)
inlineprivate

Set specified flag state.

Parameters
flag_flag to set state
state_new state of flag

Definition at line 201 of file symboldatabase.h.

Referenced by evaluate(), setValueType(), and Variable().

◆ setValueType()

void Variable::setValueType ( const ValueType valueType)

◆ smartPointerType()

const Type * Variable::smartPointerType ( ) const

◆ type() [1/2]

const Type* Variable::type ( ) const
inline

◆ type() [2/2]

void Variable::type ( const Type t)
inlineprivate

Set Type pointer to known type.

Parameters
ttype

Definition at line 661 of file symboldatabase.h.

◆ typeEndToken()

const Token* Variable::typeEndToken ( ) const
inline

Get type end token.

The type end token doesn't account the forward 'const' qualifier E.g.: static const int * const p = ...; type end token ^

Returns
type end token

Definition at line 268 of file symboldatabase.h.

Referenced by CheckOther::checkCastIntToCharAndBack(), CheckUnusedVar::checkFunctionVariableUsage_iterateScopes(), CheckClass::checkMemset(), CheckClass::checkMemsetType(), isBool(), isIterator(), SymbolDatabase::printVariable(), SymbolDatabase::printXml(), Token::typeDecl(), CheckStl::uselessCalls(), and valueFlowSetConstantValue().

◆ typeScope()

const Scope* Variable::typeScope ( ) const
inline

◆ typeStartToken()

const Token* Variable::typeStartToken ( ) const
inline

◆ valueType()

const ValueType* Variable::valueType ( ) const
inline

Friends And Related Function Documentation

◆ SymbolDatabase

friend class SymbolDatabase
friend

Definition at line 655 of file symboldatabase.h.

Member Data Documentation

◆ mAccess

AccessControl Variable::mAccess
private

what section is this variable declared in?

Definition at line 678 of file symboldatabase.h.

Referenced by evaluate(), operator=(), and SymbolDatabase::printXml().

◆ mDimensions

std::vector<Dimension> Variable::mDimensions
private

array dimensions

Definition at line 692 of file symboldatabase.h.

Referenced by arrayDimensions(), operator=(), and Variable().

◆ mFlags

unsigned int Variable::mFlags
private

flags

Definition at line 681 of file symboldatabase.h.

Referenced by operator=().

◆ mIndex

nonneg int Variable::mIndex
private

order declared

Definition at line 675 of file symboldatabase.h.

Referenced by operator=().

◆ mNameToken

const Token* Variable::mNameToken
private

variable name token

Definition at line 666 of file symboldatabase.h.

Referenced by arrayDimensions(), evaluate(), operator=(), setValueType(), and Variable().

◆ mScope

const Scope* Variable::mScope
private

pointer to scope this variable is in

Definition at line 687 of file symboldatabase.h.

Referenced by evaluate(), isMember(), operator=(), and Variable().

◆ mType

const Type* Variable::mType
private

pointer to user defined type info (for known types)

Definition at line 684 of file symboldatabase.h.

Referenced by operator=().

◆ mTypeEndToken

const Token* Variable::mTypeEndToken
private

variable type end token

Definition at line 672 of file symboldatabase.h.

Referenced by arrayDimensions(), evaluate(), operator=(), setValueType(), and Variable().

◆ mTypeStartToken

const Token* Variable::mTypeStartToken
private

variable type start token

Definition at line 669 of file symboldatabase.h.

Referenced by arrayDimensions(), evaluate(), getTypeName(), isUnsigned(), operator=(), setValueType(), and Variable().

◆ mValueType

const ValueType* Variable::mValueType {}
private

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