Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/valueflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7210,9 +7210,12 @@ struct ValueFlowPassRunner {
std::size_t n = state.settings.vfOptions.maxIterations;
while (n > 0 && values != getTotalValues()) {
values = getTotalValues();
const std::string passnum = std::to_string(state.settings.vfOptions.maxIterations - n + 1);
if (std::any_of(passes.begin(), passes.end(), [&](const ValuePtr<ValueFlowPass>& pass) {
ProgressReporter progressReporter(state.errorLogger, state.settings.reportProgress >= 0, state.tokenlist.getSourceFilePath(), std::string("ValueFlow::") + pass->name() + (' ' + passnum));
const std::string passnum = std::to_string(state.settings.vfOptions.maxIterations - n + 1);
// the string concatination is a hot spot in TestIO::testScanfArgument and TestIO::testPrintfArgumentVariables
const bool doProgress = state.settings.reportProgress >= 0;
std::string stage = doProgress ? std::string("ValueFlow::") + pass->name() + (' ' + passnum) : "";
ProgressReporter progressReporter(state.errorLogger, state.settings.reportProgress >= 0, state.tokenlist.getSourceFilePath(), std::move(stage));
return run(pass);
}))
return true;
Expand Down