@@ -614,7 +614,6 @@ bool Token::simpleMatch(const Token *tok, const char pattern[], size_t pattern_l
614614 return false ; // shortcut
615615 const char *current = pattern;
616616 const char *end = pattern + pattern_len;
617- // cppcheck-suppress shadowFunction - TODO: fix this
618617 const char *next = static_cast <const char *>(std::memchr (pattern, ' ' , pattern_len));
619618 if (!next)
620619 next = end;
@@ -769,7 +768,6 @@ nonneg int Token::getStrArraySize(const Token *tok)
769768{
770769 assert (tok != nullptr );
771770 assert (tok->tokType () == eString);
772- // cppcheck-suppress shadowFunction - TODO: fix this
773771 const std::string str (getStringLiteral (tok->str ()));
774772 int sizeofstring = 1 ;
775773 for (int i = 0 ; i < static_cast <int >(str.size ()); i++) {
@@ -2359,11 +2357,9 @@ const ::Type* Token::typeOf(const Token* tok, const Token** typeTok)
23592357 if (tok->valueType () && tok->valueType ()->typeScope && tok->valueType ()->typeScope ->definedType )
23602358 return tok->valueType ()->typeScope ->definedType ;
23612359 if (Token::simpleMatch (tok, " return" )) {
2362- // cppcheck-suppress shadowFunction - TODO: fix this
23632360 const Scope *scope = tok->scope ();
23642361 if (!scope)
23652362 return nullptr ;
2366- // cppcheck-suppress shadowFunction - TODO: fix this
23672363 const Function *function = scope->function ;
23682364 if (!function)
23692365 return nullptr ;
@@ -2473,18 +2469,15 @@ std::pair<const Token*, const Token*> Token::typeDecl(const Token* tok, bool poi
24732469 return {var->typeStartToken (), var->typeEndToken ()->next ()};
24742470 }
24752471 if (Token::simpleMatch (tok, " return" )) {
2476- // cppcheck-suppress shadowFunction - TODO: fix this
24772472 const Scope* scope = tok->scope ();
24782473 if (!scope)
24792474 return {};
2480- // cppcheck-suppress shadowFunction - TODO: fix this
24812475 const Function* function = scope->function ;
24822476 if (!function)
24832477 return {};
24842478 return { function->retDef , function->returnDefEnd () };
24852479 }
24862480 if (tok->previous () && tok->previous ()->function ()) {
2487- // cppcheck-suppress shadowFunction - TODO: fix this
24882481 const Function *function = tok->previous ()->function ();
24892482 return {function->retDef , function->returnDefEnd ()};
24902483 }
0 commit comments