Skip to content

Commit

Permalink
valueflow.cpp: issue a debug message about analysis of condition expr…
Browse files Browse the repository at this point in the history
…essions being disabled (#6025)
  • Loading branch information
firewave authored Apr 20, 2024
1 parent 0fd3d20 commit fb15ac6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions lib/valueflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5379,7 +5379,14 @@ static const Scope* getLoopScope(const Token* tok)
static void valueFlowConditionExpressions(const TokenList &tokenlist, const SymbolDatabase& symboldatabase, ErrorLogger &errorLogger, const Settings &settings)
{
if (!settings.daca && (settings.checkLevel == Settings::CheckLevel::normal))
{
if (settings.debugwarnings) {
ErrorMessage::FileLocation loc(tokenlist.getSourceFilePath(), 0, 0);
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);
errorLogger.reportErr(errmsg);
}
return;
}

for (const Scope * scope : symboldatabase.functionScopes) {
if (const Token* incompleteTok = findIncompleteVar(scope->bodyStart, scope->bodyEnd)) {
Expand Down
4 changes: 2 additions & 2 deletions tools/donate_cpu_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/
# Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic
# changes)
CLIENT_VERSION = "1.3.56"
CLIENT_VERSION = "1.3.57"

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

0 comments on commit fb15ac6

Please sign in to comment.