Skip to content

Commit ad8621e

Browse files
committed
valueflow.cpp: issue a debug message about analysis of condition expressions being disabled
1 parent d7afc77 commit ad8621e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
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)) {

0 commit comments

Comments
 (0)