Don't check ignored function return value in ({..}). Ticket: #7934

This commit is contained in:
Daniel Marjamäki 2017-03-08 10:23:38 +01:00
parent e569d96169
commit 5d7fa590af
1 changed files with 2 additions and 2 deletions

View File

@ -156,8 +156,8 @@ void CheckFunctions::checkIgnoredReturnValue()
for (std::size_t i = 0; i < functions; ++i) {
const Scope * scope = symbolDatabase->functionScopes[i];
for (const Token* tok = scope->classStart->next(); tok != scope->classEnd; tok = tok->next()) {
// c++11 initialization
if (Token::Match(tok, "%var% (| {"))
// skip c++11 initialization, ({...})
if (Token::Match(tok, "%var%|( {"))
tok = tok->linkAt(1);
if (tok->varId() || !Token::Match(tok, "%name% ("))