From de80d41ef4a4e7bd82cd552cc9bad8a3adfc1a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 2 Apr 2017 19:44:27 +0200 Subject: [PATCH] CheckFunctions::checkIgnoredReturnValue: Dont warn in C++11 initializer lists in function arguments --- lib/checkfunctions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkfunctions.cpp b/lib/checkfunctions.cpp index 364bf919a..c85354e58 100644 --- a/lib/checkfunctions.cpp +++ b/lib/checkfunctions.cpp @@ -157,7 +157,7 @@ void CheckFunctions::checkIgnoredReturnValue() const Scope * scope = symbolDatabase->functionScopes[i]; for (const Token* tok = scope->classStart->next(); tok != scope->classEnd; tok = tok->next()) { // skip c++11 initialization, ({...}) - if (Token::Match(tok, "%var%|( {")) + if (Token::Match(tok, "%var%|(|, {")) tok = tok->linkAt(1); if (tok->varId() || !Token::Match(tok, "%name% ("))