Skip to content

Commit 7dc6f31

Browse files
committed
Use zero-based raw for-loop for counting the Z3 attempts
1 parent f7041f5 commit 7dc6f31

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/StaticAnalyzer/Core/Z3CrosscheckVisitor.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ void Z3CrosscheckVisitor::finalizeVisitor(BugReporterContext &BRC,
9999

100100
// And check for satisfiability
101101
unsigned MinQueryTimeAcrossAttempts = std::numeric_limits<unsigned>::max();
102-
unsigned NumRetries = Opts.Z3CrosscheckRetriesOnTimeout;
103-
for (unsigned Attempt = 1; Attempt <= 1 + NumRetries; ++Attempt) {
102+
for (unsigned I = 0; I <= Opts.Z3CrosscheckRetriesOnTimeout; ++I) {
104103
Result = AttemptOnce(RefutationSolver);
105104
Result.Z3QueryTimeMilliseconds =
106105
std::min(MinQueryTimeAcrossAttempts, Result.Z3QueryTimeMilliseconds);

0 commit comments

Comments
 (0)