diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index eb1861d6e22..c56e6667055 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -7148,8 +7148,13 @@ void SymbolDatabase::setValueTypeInTokenList(bool reportDebugWarnings, Token *to if (reportDebugWarnings && mSettings->debugwarnings) { for (Token *tok = tokens; tok; tok = tok->next()) { - if (tok->str() == "auto" && !tok->valueType()) + if (tok->str() == "auto" && !tok->valueType()) { + if (Token::Match(tok->next(), "%name% ; %name% = [") && isLambdaCaptureList(tok->tokAt(5))) + continue; + if (Token::Match(tok->next(), "%name% { [") && isLambdaCaptureList(tok->tokAt(3))) + continue; debugMessage(tok, "autoNoType", "auto token with no type."); + } } }