don't debug warn about class function definitions without body having missing varid on function parameters
This commit is contained in:
parent
c5b81c6a79
commit
6750c7b492
|
@ -650,7 +650,7 @@ SymbolDatabase::SymbolDatabase(const Tokenizer *tokenizer, const Settings *setti
|
|||
for (func = scope->functionList.begin(); func != scope->functionList.end(); ++func)
|
||||
{
|
||||
// add arguments
|
||||
func->addArguments(this, scope);
|
||||
func->addArguments(this, &*func, scope);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1234,7 +1234,7 @@ unsigned int Function::initializedArgCount() const
|
|||
return count;
|
||||
}
|
||||
|
||||
void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *scope)
|
||||
void Function::addArguments(const SymbolDatabase *symbolDatabase, const Function *func, const Scope *scope)
|
||||
{
|
||||
// check for non-empty argument list "( ... )"
|
||||
if (arg->link() != arg->next() && !Token::simpleMatch(arg, "( void )"))
|
||||
|
@ -1279,6 +1279,7 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
|
|||
nameTok = tok->previous();
|
||||
endTok = nameTok->previous();
|
||||
|
||||
if (func->hasBody)
|
||||
symbolDatabase->debugMessage(nameTok, "Function::addArguments found argument \'" + nameTok->str() + "\' with varid 0.");
|
||||
}
|
||||
else
|
||||
|
|
|
@ -353,7 +353,7 @@ public:
|
|||
return argumentList.size();
|
||||
}
|
||||
unsigned int initializedArgCount() const;
|
||||
void addArguments(const SymbolDatabase *symbolDatabase, const Scope *scope);
|
||||
void addArguments(const SymbolDatabase *symbolDatabase, const Function *func, const Scope *scope);
|
||||
|
||||
const Token *tokenDef; // function name token in class definition
|
||||
const Token *argDef; // function argument start '(' in class definition
|
||||
|
|
Loading…
Reference in New Issue