We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae79b47 commit f6efd8cCopy full SHA for f6efd8c
1 file changed
lib/checkfunctions.cpp
@@ -273,11 +273,11 @@ void CheckFunctions::checkMissingReturn()
273
}
274
if (inconclusive && Token::simpleMatch(scope->bodyEnd->tokAt(-2), ") ; }")) {
275
const Token *ftok = scope->bodyEnd->linkAt(-2)->previous();
276
- if (mSettings->library.isNotLibraryFunction(ftok) && !ftok->isKeyword()) {
+ if (mSettings->library.isNotLibraryFunction(ftok)) {
277
const Token *tok = ftok;
278
while (Token::Match(tok->tokAt(-2), "%name% :: %name%"))
279
tok = tok->tokAt(-2);
280
- if (Token::Match(tok->previous(), "[;{}] %name% (|::"))
+ if (Token::Match(tok->previous(), "[;{}] %name% (|::") && !tok->isKeyword())
281
missingReturnError(tok, Certainty::inconclusive);
282
283
0 commit comments