CheckFunctions::checkIgnoredReturnValue: Dont warn in C++11 initializer lists in function arguments
This commit is contained in:
parent
f7bfbee809
commit
de80d41ef4
|
@ -157,7 +157,7 @@ void CheckFunctions::checkIgnoredReturnValue()
|
||||||
const Scope * scope = symbolDatabase->functionScopes[i];
|
const Scope * scope = symbolDatabase->functionScopes[i];
|
||||||
for (const Token* tok = scope->classStart->next(); tok != scope->classEnd; tok = tok->next()) {
|
for (const Token* tok = scope->classStart->next(); tok != scope->classEnd; tok = tok->next()) {
|
||||||
// skip c++11 initialization, ({...})
|
// skip c++11 initialization, ({...})
|
||||||
if (Token::Match(tok, "%var%|( {"))
|
if (Token::Match(tok, "%var%|(|, {"))
|
||||||
tok = tok->linkAt(1);
|
tok = tok->linkAt(1);
|
||||||
|
|
||||||
if (tok->varId() || !Token::Match(tok, "%name% ("))
|
if (tok->varId() || !Token::Match(tok, "%name% ("))
|
||||||
|
|
Loading…
Reference in New Issue