@@ -854,7 +854,7 @@ void SymbolDatabase::createSymbolDatabaseVariableInfo()
854
854
855
855
for (func = scope.functionList .begin (); func != scope.functionList .end (); ++func) {
856
856
// add arguments
857
- func->addArguments (this , &scope);
857
+ func->addArguments (&scope);
858
858
}
859
859
}
860
860
}
@@ -4412,17 +4412,17 @@ void SymbolDatabase::printXml(std::ostream &out) const
4412
4412
4413
4413
// ---------------------------------------------------------------------------
4414
4414
4415
- static const Type* findVariableTypeIncludingUsedNamespaces (const SymbolDatabase& symbolDatabase, const Scope* scope, const Token* typeTok)
4415
+ static const Type* findVariableTypeIncludingUsedNamespaces (const Scope* scope, const Token* typeTok)
4416
4416
{
4417
- const Type* argType = symbolDatabase. findVariableType (scope, typeTok);
4417
+ const Type* argType = scope-> symdb -> findVariableType (scope, typeTok);
4418
4418
if (argType)
4419
4419
return argType;
4420
4420
4421
4421
// look for variable type in any using namespace in this scope or above
4422
4422
while (scope) {
4423
4423
for (const Scope::UsingInfo &ui : scope->usingList ) {
4424
4424
if (ui.scope ) {
4425
- argType = symbolDatabase. findVariableType (ui.scope , typeTok);
4425
+ argType = scope-> symdb -> findVariableType (ui.scope , typeTok);
4426
4426
if (argType)
4427
4427
return argType;
4428
4428
}
@@ -4434,7 +4434,7 @@ static const Type* findVariableTypeIncludingUsedNamespaces(const SymbolDatabase&
4434
4434
4435
4435
// ---------------------------------------------------------------------------
4436
4436
4437
- void Function::addArguments (const SymbolDatabase *symbolDatabase, const Scope *scope)
4437
+ void Function::addArguments (const Scope *scope)
4438
4438
{
4439
4439
// check for non-empty argument list "( ... )"
4440
4440
const Token * start = arg ? arg : argDef;
@@ -4495,7 +4495,7 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
4495
4495
while (Token::Match (typeTok, " const|volatile|enum|struct|::" ))
4496
4496
typeTok = typeTok->next ();
4497
4497
if (Token::Match (typeTok, " ,|)" )) { // #8333
4498
- symbolDatabase ->mTokenizer .syntaxError (typeTok);
4498
+ scope-> symdb ->mTokenizer .syntaxError (typeTok);
4499
4499
}
4500
4500
if (Token::Match (typeTok, " %type% <" ) && Token::Match (typeTok->linkAt (1 ), " > :: %type%" ))
4501
4501
typeTok = typeTok->linkAt (1 )->tokAt (2 );
@@ -4514,7 +4514,7 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
4514
4514
endTok = nameTok->previous ();
4515
4515
4516
4516
if (hasBody ())
4517
- symbolDatabase ->debugMessage (nameTok, " varid0" , " Function::addArguments found argument \' " + nameTok->str () + " \' with varid 0." );
4517
+ scope-> symdb ->debugMessage (nameTok, " varid0" , " Function::addArguments found argument \' " + nameTok->str () + " \' with varid 0." );
4518
4518
} else
4519
4519
endTok = typeTok;
4520
4520
} else
@@ -4523,7 +4523,7 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
4523
4523
4524
4524
const ::Type *argType = nullptr ;
4525
4525
if (!typeTok->isStandardType ()) {
4526
- argType = findVariableTypeIncludingUsedNamespaces (*symbolDatabase, scope, typeTok);
4526
+ argType = findVariableTypeIncludingUsedNamespaces (scope, typeTok);
4527
4527
4528
4528
// save type
4529
4529
const_cast <Token *>(typeTok)->type (argType);
@@ -4545,7 +4545,7 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
4545
4545
if (startTok == nameTok)
4546
4546
break ;
4547
4547
4548
- argumentList.emplace_back (nameTok, startTok, endTok, count++, AccessControl::Argument, argType, functionScope, symbolDatabase ->mTokenizer .getSettings ());
4548
+ argumentList.emplace_back (nameTok, startTok, endTok, count++, AccessControl::Argument, argType, functionScope, scope-> symdb ->mTokenizer .getSettings ());
4549
4549
4550
4550
if (tok->str () == " )" ) {
4551
4551
// check for a variadic function or a variadic template function
@@ -4980,7 +4980,7 @@ const Token *Scope::checkVariable(const Token *tok, AccessControl varaccess, con
4980
4980
const Type *vType = nullptr ;
4981
4981
4982
4982
if (typetok) {
4983
- vType = findVariableTypeIncludingUsedNamespaces (*symdb, this , typetok);
4983
+ vType = findVariableTypeIncludingUsedNamespaces (this , typetok);
4984
4984
4985
4985
const_cast <Token *>(typetok)->type (vType);
4986
4986
}
0 commit comments