diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index c17b03d6d..19272cd55 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -7204,8 +7204,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."); + } } }