Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions lib/astutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2230,8 +2230,6 @@ bool isEscapeFunction(const Token* ftok, const Library& library)
{
if (!Token::Match(ftok, "%name% ("))
return false;
if (Token::Match(ftok, "exit|abort"))
return true;
const Function* function = ftok->function();
Comment thread
chrchr-github marked this conversation as resolved.
Outdated
if (function) {
if (function->isEscapeFunction())
Expand Down Expand Up @@ -2259,11 +2257,8 @@ static bool hasNoreturnFunction(const Token* tok, const Library& library, const
return true;
if (function->isAttributeNoreturn())
return true;
} else if (library.isnoreturn(ftok)) {
return true;
} else if (Token::Match(ftok, "exit|abort")) {
} else if (library.isnoreturn(ftok))
return true;
}
if (unknownFunc && !function && library.functions().count(library.getFunctionName(ftok)) == 0)
*unknownFunc = ftok;
return false;
Expand Down
2 changes: 1 addition & 1 deletion lib/checkother.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ void CheckOtherImpl::redundantAssignmentSameValueError(const Token *tok, const V
//---------------------------------------------------------------------------
static inline bool isFunctionOrBreakPattern(const Token *tok)
{
return Token::Match(tok, "%name% (") || Token::Match(tok, "break|continue|return|exit|goto|throw");
return Token::Match(tok, "%name% (") || (tok->isKeyword() && Token::Match(tok, "break|continue|return|goto|throw"));
}

void CheckOtherImpl::redundantBitwiseOperationInSwitchError()
Expand Down
Loading