Skip to content

Commit f6efd8c

Browse files
committed
CI; Fix self check false positive
1 parent ae79b47 commit f6efd8c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/checkfunctions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,11 @@ void CheckFunctions::checkMissingReturn()
273273
}
274274
if (inconclusive && Token::simpleMatch(scope->bodyEnd->tokAt(-2), ") ; }")) {
275275
const Token *ftok = scope->bodyEnd->linkAt(-2)->previous();
276-
if (mSettings->library.isNotLibraryFunction(ftok) && !ftok->isKeyword()) {
276+
if (mSettings->library.isNotLibraryFunction(ftok)) {
277277
const Token *tok = ftok;
278278
while (Token::Match(tok->tokAt(-2), "%name% :: %name%"))
279279
tok = tok->tokAt(-2);
280-
if (Token::Match(tok->previous(), "[;{}] %name% (|::"))
280+
if (Token::Match(tok->previous(), "[;{}] %name% (|::") && !tok->isKeyword())
281281
missingReturnError(tok, Certainty::inconclusive);
282282
}
283283
}

0 commit comments

Comments
 (0)