Skip to content

Commit

Permalink
use existing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ludviggunne committed Sep 24, 2024
1 parent 0bb6ded commit 49d18e7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/checkunusedfunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,6 @@ void CheckUnusedFunctions::parseTokens(const Tokenizer &tokenizer, const Setting
funcname = tok->next();
while (Token::Match(funcname, "%name% :: %name%"))
funcname = funcname->tokAt(2);
} else if (Token::Match(tok, "& %name%") && tok->scope()->isLocal()) {
funcname = tok->next();
while (Token::Match(funcname, "%name% :: %name%"))
funcname = funcname->tokAt(2);
} else if (tok->scope()->type != Scope::ScopeType::eEnum && (Token::Match(tok, "[;{}.,()[=+-/|!?:]") || Token::Match(tok, "return|throw"))) {
funcname = tok->next();
if (funcname && funcname->str() == "&")
Expand All @@ -253,7 +249,7 @@ void CheckUnusedFunctions::parseTokens(const Tokenizer &tokenizer, const Setting
while (Token::Match(funcname, "%name% :: %name%"))
funcname = funcname->tokAt(2);

if (!Token::Match(funcname, "%name% [(),;]:}>]"))
if (!Token::Match(funcname, "%name% [(),;]:}<>]"))
continue;
}

Expand Down

0 comments on commit 49d18e7

Please sign in to comment.