@@ -928,7 +928,7 @@ void SymbolDatabase::createSymbolDatabaseNeedInitialization()
928928 if (retry == 100 && mSettings ->debugwarnings ) {
929929 for (const Scope& scope : scopeList) {
930930 if (scope.isClassOrStruct () && scope.definedType ->needInitialization == Type::NeedInitialization::Unknown)
931- debugMessage (scope.classDef , " SymbolDatabase:: SymbolDatabase couldn't resolve all user defined types." );
931+ debugMessage (scope.classDef , " debug " , " SymbolDatabase couldn't resolve all user defined types." );
932932 }
933933 }
934934 }
@@ -1744,7 +1744,7 @@ bool SymbolDatabase::isFunction(const Token *tok, const Scope* outerScope, const
17441744 Token::simpleMatch (tok->linkAt (1 ), " ) {" ) &&
17451745 (!tok->previous () || Token::Match (tok->previous (), " ;|}" ))) {
17461746 if (mTokenizer ->isC ()) {
1747- debugMessage (tok, " SymbolDatabase::isFunction found C function '" + tok->str () + " ' without a return type." );
1747+ debugMessage (tok, " debug " , " SymbolDatabase::isFunction found C function '" + tok->str () + " ' without a return type." );
17481748 *funcStart = tok;
17491749 *argStart = tok->next ();
17501750 *declEnd = tok->linkAt (1 )->next ();
@@ -2977,13 +2977,13 @@ const std::string& Type::name() const
29772977 return emptyString;
29782978}
29792979
2980- void SymbolDatabase::debugMessage (const Token *tok, const std::string &msg) const
2980+ void SymbolDatabase::debugMessage (const Token *tok, const std::string &type, const std::string & msg) const
29812981{
29822982 if (tok && mSettings ->debugwarnings ) {
29832983 const std::list<const Token*> locationList (1 , tok);
29842984 const ErrorMessage errmsg (locationList, &mTokenizer ->list ,
29852985 Severity::debug,
2986- " debug " ,
2986+ type ,
29872987 msg,
29882988 false );
29892989 if (mErrorLogger )
@@ -3712,7 +3712,7 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
37123712 endTok = nameTok->previous ();
37133713
37143714 if (hasBody ())
3715- symbolDatabase->debugMessage (nameTok, " Function::addArguments found argument \' " + nameTok->str () + " \' with varid 0." );
3715+ symbolDatabase->debugMessage (nameTok, " varid0 " , " Function::addArguments found argument \' " + nameTok->str () + " \' with varid 0." );
37163716 } else
37173717 endTok = typeTok;
37183718 } else
@@ -4140,7 +4140,7 @@ const Token *Scope::checkVariable(const Token *tok, AccessControl varaccess, con
41404140
41414141 if (vartok->varId () == 0 ) {
41424142 if (!vartok->isBoolean ())
4143- check->debugMessage (vartok, " Scope::checkVariable found variable \' " + vartok->str () + " \' with varid 0." );
4143+ check->debugMessage (vartok, " varid0 " , " Scope::checkVariable found variable \' " + vartok->str () + " \' with varid 0." );
41444144 return tok;
41454145 }
41464146
@@ -4933,7 +4933,7 @@ const Function* SymbolDatabase::findFunction(const Token *tok) const
49334933 tok1 = tok1->linkAt (-2 )->tokAt (-1 );
49344934 else {
49354935 if (mSettings ->debugwarnings )
4936- debugMessage (tok1->tokAt (-2 ), " SymbolDatabase::findFunction found '>' without link." );
4936+ debugMessage (tok1->tokAt (-2 ), " debug " , " SymbolDatabase::findFunction found '>' without link." );
49374937 return nullptr ;
49384938 }
49394939 } else
@@ -6344,7 +6344,7 @@ void SymbolDatabase::setValueTypeInTokenList(bool reportDebugWarnings, Token *to
63446344 if (reportDebugWarnings && mSettings ->debugwarnings ) {
63456345 for (Token *tok = tokens; tok; tok = tok->next ()) {
63466346 if (tok->str () == " auto" && !tok->valueType ())
6347- debugMessage (tok, " auto token with no type." );
6347+ debugMessage (tok, " debug " , " auto token with no type." );
63486348 }
63496349 }
63506350
0 commit comments