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
  • Loading branch information
firewave committed Apr 20, 2024
1 parent d7afc77 commit ad8621e
Showing 1 changed file with 7 additions and 0 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

0 comments on commit ad8621e

Please sign in to comment.