CheckUnusedVar: Quick heuristic so we don't bailout for 'auto' variables

This commit is contained in:
Daniel Marjamäki 2019-11-17 15:44:57 +01:00
parent 9ce2641704
commit 1d441f64c1
1 changed files with 1 additions and 1 deletions

View File

@ -1223,7 +1223,7 @@ void CheckUnusedVar::checkFunctionVariableUsage()
FwdAnalysis fwdAnalysis(mTokenizer->isCPP(), mSettings->library); FwdAnalysis fwdAnalysis(mTokenizer->isCPP(), mSettings->library);
if (fwdAnalysis.unusedValue(expr, start, scope->bodyEnd)) { if (fwdAnalysis.unusedValue(expr, start, scope->bodyEnd)) {
if (!bailoutTypeName.empty()) { if (!bailoutTypeName.empty() && bailoutTypeName != "auto") {
if (mSettings->checkLibrary && mSettings->isEnabled(Settings::INFORMATION)) { if (mSettings->checkLibrary && mSettings->isEnabled(Settings::INFORMATION)) {
reportError(tok, reportError(tok,
Severity::information, Severity::information,