From 155ff890a58f781a5101d52a89f47ecf3702d85a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Fri, 16 Apr 2021 15:19:29 +0200 Subject: [PATCH] split "autoNoType" and "bailoutUninitVar" from more generic "debug" (#3209) --- .travis_suppressions | 2 ++ lib/checkuninitvar.cpp | 2 +- lib/symboldatabase.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis_suppressions b/.travis_suppressions index 4bc75efe3..cc755bb01 100644 --- a/.travis_suppressions +++ b/.travis_suppressions @@ -14,6 +14,8 @@ valueFlowBailout valueFlowBailoutIncompleteVar debug varid0 +autoNoType +bailoutUninitVar *:gui/test/* *:test/test.cxx diff --git a/lib/checkuninitvar.cpp b/lib/checkuninitvar.cpp index 06a9d4bc3..4c0735021 100644 --- a/lib/checkuninitvar.cpp +++ b/lib/checkuninitvar.cpp @@ -465,7 +465,7 @@ bool CheckUninitVar::checkScopeForVariable(const Token *tok, const Variable& var if (tok2->isName() && tok2->next()->isName()) 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; } diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 367f713eb..28d4b2533 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -6498,7 +6498,7 @@ 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()) - debugMessage(tok, "debug", "auto token with no type."); + debugMessage(tok, "autoNoType", "auto token with no type."); } }