Skip to content

Commit 9c4ed8f

Browse files
firewavedanmar
authored andcommitted
valueflow.cpp: issue a debug message about analysis of condition expressions being disabled (#6025)
1 parent e66487a commit 9c4ed8f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lib/valueflow.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5379,7 +5379,14 @@ static const Scope* getLoopScope(const Token* tok)
53795379
static void valueFlowConditionExpressions(const TokenList &tokenlist, const SymbolDatabase& symboldatabase, ErrorLogger &errorLogger, const Settings &settings)
53805380
{
53815381
if (!settings.daca && (settings.checkLevel == Settings::CheckLevel::normal))
5382+
{
5383+
if (settings.debugwarnings) {
5384+
ErrorMessage::FileLocation loc(tokenlist.getSourceFilePath(), 0, 0);
5385+
const ErrorMessage errmsg({std::move(loc)}, tokenlist.getSourceFilePath(), Severity::debug, "Analysis of condition expressions is disabled. Use --check-level=exhaustive to enable it.", "normalCheckLevelConditionExpressions", Certainty::normal);
5386+
errorLogger.reportErr(errmsg);
5387+
}
53825388
return;
5389+
}
53835390

53845391
for (const Scope * scope : symboldatabase.functionScopes) {
53855392
if (const Token* incompleteTok = findIncompleteVar(scope->bodyStart, scope->bodyEnd)) {

tools/donate_cpu_lib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/
1717
# Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic
1818
# changes)
19-
CLIENT_VERSION = "1.3.56"
19+
CLIENT_VERSION = "1.3.57"
2020

2121
# Timeout for analysis with Cppcheck in seconds
2222
CPPCHECK_TIMEOUT = 30 * 60
@@ -450,7 +450,7 @@ def scan_package(cppcheck_path, source_path, libraries, capture_callstack=True,
450450
options += ' --check-level=' + check_level
451451
if debug_warnings:
452452
options += ' --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout' \
453-
' --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning'
453+
' --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning --suppress=normalCheckLevelConditionExpressions'
454454
options += ' -D__GNUC__ --platform=unix64'
455455
options_rp = options + ' -rp={}'.format(dir_to_scan)
456456
if __make_cmd == 'msbuild.exe':

0 commit comments

Comments
 (0)