split "autoNoType" and "bailoutUninitVar" from more generic "debug" (#3209)

This commit is contained in:
Oliver Stöneberg 2021-04-16 15:19:29 +02:00 committed by GitHub
parent c98afa83fd
commit 155ff890a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -14,6 +14,8 @@ valueFlowBailout
valueFlowBailoutIncompleteVar valueFlowBailoutIncompleteVar
debug debug
varid0 varid0
autoNoType
bailoutUninitVar
*:gui/test/* *:gui/test/*
*:test/test.cxx *:test/test.cxx

View File

@ -465,7 +465,7 @@ bool CheckUninitVar::checkScopeForVariable(const Token *tok, const Variable& var
if (tok2->isName() && tok2->next()->isName()) if (tok2->isName() && tok2->next()->isName())
condition += ' '; condition += ' ';
} }
reportError(tok, Severity::debug, "debug", "bailout uninitialized variable checking for '" + var.name() + "'. can't determine if this condition can be false when previous condition is false: " + condition); reportError(tok, Severity::debug, "bailoutUninitVar", "bailout uninitialized variable checking for '" + var.name() + "'. can't determine if this condition can be false when previous condition is false: " + condition);
} }
return true; return true;
} }

View File

@ -6498,7 +6498,7 @@ void SymbolDatabase::setValueTypeInTokenList(bool reportDebugWarnings, Token *to
if (reportDebugWarnings && mSettings->debugwarnings) { if (reportDebugWarnings && mSettings->debugwarnings) {
for (Token *tok = tokens; tok; tok = tok->next()) { for (Token *tok = tokens; tok; tok = tok->next()) {
if (tok->str() == "auto" && !tok->valueType()) if (tok->str() == "auto" && !tok->valueType())
debugMessage(tok, "debug", "auto token with no type."); debugMessage(tok, "autoNoType", "auto token with no type.");
} }
} }