44// RUN: -analyzer-config eagerly-assume=false \
55// RUN: -verify=expected,noassumeone,noeagerlyassume,combo %s
66// RUN: %clang_analyze_cc1 -analyzer-checker=debug.ExprInspection \
7- // RUN: -analyzer-config assume-one-iteration=true \
7+ // RUN: -analyzer-config assume-at-least- one-iteration=true \
88// RUN: -verify=expected,eagerlyassume,combo %s
99// RUN: %clang_analyze_cc1 -analyzer-checker=debug.ExprInspection \
10- // RUN: -analyzer-config assume-one-iteration=true,eagerly-assume=false \
10+ // RUN: -analyzer-config assume-at-least- one-iteration=true,eagerly-assume=false \
1111// RUN: -verify=expected,noeagerlyassume %s
1212
1313// The verify tag "combo" is used for one unique warning which is produced in three
1818// if the code does not imply that they are possible.
1919// In particular, if two (or more) iterations are already completed in a loop,
2020// we don't assume that there can be another iteration. Moreover, if the
21- // analyzer option `assume-one-iteration` is enabled, then we don't assume that
22- // a loop can be skipped completely.
21+ // analyzer option `assume-at-least- one-iteration` is enabled, then we don't
22+ // assume that a loop can be skipped completely.
2323
2424void clang_analyzer_numTimesReached (void );
2525void clang_analyzer_dump (int );
@@ -37,7 +37,7 @@ void clearTrueCondition(void) {
3737
3838void clearFalseCondition (void ) {
3939 // If the analyzer can definitely determine that the loop condition is false,
40- // then the loop is (obviously) skipped, even in `assume-one-iteration` mode.
40+ // then the loop is skipped, even in `assume-at-least -one-iteration` mode.
4141 int i ;
4242 for (i = 0 ; i > 10 ; i ++ )
4343 clang_analyzer_numTimesReached (); // Unreachable, no report.
@@ -51,8 +51,8 @@ void opaqueCondition(int arg) {
5151 // that more than two iterations are possible. (It _does_ imply that two
5252 // iterations may be possible at least in some cases, because otherwise an
5353 // `if` would've been enough.)
54- // Moreover, if `assume-one-iteration` is enabled, then assume at least one
55- // iteration.
54+ // Moreover, if `assume-at-least- one-iteration` is enabled, then assume at
55+ // least one iteration.
5656 int i ;
5757 for (i = 0 ; i < arg ; i ++ )
5858 clang_analyzer_numTimesReached (); // expected-warning {{2}}
@@ -175,9 +175,10 @@ void eagerlyAssumeInSubexpression(int arg) {
175175 clang_analyzer_numTimesReached (); // eagerlyassume-warning {{4}} noeagerlyassume-warning {{2}}
176176 }
177177
178- // The 'combo' warning intentionally appears when `assume-one-iteration` is
179- // disabled, but also appears as a bug (or at least inaccuracy) when
180- // `assume-one-iteration` is true but `EagerlyAssume` is also enabled.
178+ // The 'combo' note intentionally appears if `assume-at-least-one-iteration`
179+ // is disabled, but also appears as a bug (or at least inaccuracy) when
180+ // `assume-at-least-one-iteration` is true but `EagerlyAssume` is also
181+ // enabled.
181182 clang_analyzer_dump (i ); // combo-warning {{0}} expected-warning {{1}} expected-warning {{2}} eagerlyassume-warning {{3}}
182183}
183184
0 commit comments