save pointer to Function info in function scope in symboldatabase
This commit is contained in:
parent
836fadcb6a
commit
47a90851f1
|
@ -284,7 +284,10 @@ SymbolDatabase::SymbolDatabase(const Tokenizer *tokenizer, const Settings *setti
|
|||
|
||||
addNewFunction(&scope, &tok2);
|
||||
if (scope)
|
||||
{
|
||||
scope->functionOf = functionOf;
|
||||
scope->function = &functionOf->functionList.back();
|
||||
}
|
||||
|
||||
tok = tok2;
|
||||
}
|
||||
|
@ -968,6 +971,8 @@ void SymbolDatabase::addFunction(Scope **scope, const Token **tok, const Token *
|
|||
if (*scope)
|
||||
{
|
||||
(*scope)->functionOf = scope1;
|
||||
(*scope)->function = &scope1->functionList.back();
|
||||
|
||||
added = true;
|
||||
}
|
||||
break;
|
||||
|
@ -1247,7 +1252,8 @@ Scope::Scope(SymbolDatabase *check_, const Token *classDef_, Scope *nestedIn_, S
|
|||
access(Public),
|
||||
numConstructors(0),
|
||||
needInitialization(Scope::Unknown),
|
||||
functionOf(NULL)
|
||||
functionOf(NULL),
|
||||
function(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1259,7 +1265,8 @@ Scope::Scope(SymbolDatabase *check_, const Token *classDef_, Scope *nestedIn_) :
|
|||
nestedIn(nestedIn_),
|
||||
numConstructors(0),
|
||||
needInitialization(Scope::Unknown),
|
||||
functionOf(NULL)
|
||||
functionOf(NULL),
|
||||
function(NULL)
|
||||
{
|
||||
if (!classDef)
|
||||
{
|
||||
|
|
|
@ -404,6 +404,7 @@ public:
|
|||
|
||||
// function specific fields
|
||||
Scope *functionOf; // scope this function belongs to
|
||||
Function *function; // function info for this function
|
||||
|
||||
bool isClassOrStruct() const
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue