• Home
  • Raw
  • Download

Lines Matching +full:for +full:- +full:in

1 // RUN: %clang_cc1 -fsyntax-only -Wloop-analysis -verify %s
14 for (; !s.stop();) {} in test1()
15 for (; s.keep_running;) {} in test1()
16 for (int i; i < 1; ++i) {} in test1()
17for (int i; i < 1; ) {} // expected-warning {{variable 'i' used in loop condition not modified in in test1()
18 for (int i; i < 1; ) { ++i; } in test1()
19 for (int i; i < 1; ) { return; } in test1()
20 for (int i; i < 1; ) { break; } in test1()
21 for (int i; i < 1; ) { goto exit_loop; } in test1()
23 for (int i; i < 1; ) { by_ref(i); } in test1()
24for (int i; i < 1; ) { by_value(i); } // expected-warning {{variable 'i' used in loop condition n… in test1()
25 for (int i; i < 1; ) { by_pointer(&i); } in test1()
27 for (int i; i < 1; ++i) in test1()
28 for (int j; j < 1; ++j) in test1()
30 for (int i; i < 1; ++i) in test1()
31for (int j; j < 1; ++i) // expected-warning {{variable 'j' used in loop condition not modified in in test1()
33 for (int i; i < 1; ++i) in test1()
34for (int j; i < 1; ++j) // expected-warning {{variable 'i' used in loop condition not modified in in test1()
37 for (int *i, *j; i < j; ++i) {} in test1()
38for (int *i, *j; i < j;) {} // expected-warning {{variables 'i' and 'j' used in loop condition no… in test1()
40 // Dereferencing pointers is ignored for now. in test1()
41 for (int *i; *i; ) {} in test1()
49for (; i; ) {} // expected-warning {{variable 'i' used in loop condition not modified in loop body… in test2()
50 for (; i; ) { i = 5; } in test2()
53for (; i < j; ) {} // expected-warning {{variables 'i' and 'j' used in loop condition not modified… in test2()
54 for (; i < j; ) { i = 5; } in test2()
55 for (; i < j; ) { j = 5; } in test2()
58for (; i < 5; ) {} // expected-warning {{variable 'i' used in loop condition not modified in loop … in test2()
59 for (; i < 5; ) { i = 5; } in test2()
62for (; i < 5.0; ) {} // expected-warning {{variable 'i' used in loop condition not modified in loo… in test2()
63 for (; i < 5.0; ) { i = 5; } in test2()
66for (; i == 'a'; ) {} // expected-warning {{variable 'i' used in loop condition not modified in lo… in test2()
67 for (; i == 'a'; ) { i = 5; } in test2()
70for (; i == true; ) {} // expected-warning {{variable 'i' used in loop condition not modified in l… in test2()
71 for (; i == true; ) { i = 5; } in test2()
74for (; ptr == __null; ) {} // expected-warning {{variable 'ptr' used in loop condition not modifie… in test2()
75 for (; ptr == __null; ) { ptr = &i; } in test2()
78for (; -i > 5; ) {} // expected-warning {{variable 'i' used in loop condition not modified in loop… in test2()
79 for (; -i > 5; ) { ++i; } in test2()
82for (; i != 3i; ) {} // expected-warning {{variable 'i' used in loop condition not modified in loo… in test2()
83 for (; i != 3i; ) { ++i; } in test2()
86for (; i ? j : k; ) {} // expected-warning {{variables 'i', 'j', and 'k' used in loop condition no… in test2()
87 for (; i ? j : k; ) { ++i; } in test2()
88 for (; i ? j : k; ) { ++j; } in test2()
89 for (; i ? j : k; ) { ++k; } in test2()
90for (; i; ) { j = i ? i : i; } // expected-warning {{variable 'i' used in loop condition not modi… in test2()
91 for (; i; ) { j = (i = 1) ? i : i; } in test2()
92 for (; i; ) { j = i ? i : ++i; } in test2()
95for (; i ?: j; ) {} // expected-warning {{variables 'i' and 'j' used in loop condition not modifie… in test2()
96 for (; i ?: j; ) { ++i; } in test2()
97 for (; i ?: j; ) { ++j; } in test2()
98for (; i; ) { j = i ?: i; } // expected-warning {{variable 'i' used in loop condition not modifie… in test2()
101for (; (i); ) { } // expected-warning {{variable 'i' used in loop condition not modified in loop … in test2()
102 for (; (i); ) { ++i; } in test2()
104 // Testing non-evaluated variables in test2()
105for (; i < sizeof(j); ) { } // expected-warning {{variable 'i' used in loop condition not modifie… in test2()
106for (; i < sizeof(j); ) { ++j; } // expected-warning {{variable 'i' used in loop condition not mo… in test2()
107 for (; i < sizeof(j); ) { ++i; } in test2()
114for (;x<5;) { *ptr = 6; } // expected-warning {{variable 'x' used in loop condition not modified in test3()
116 for (;x<5;) { in test3()
125 for (; a;); // expected-warning {{variable 'a' used in loop condition not modified in loop body}} in test4()
126for (; a + b;); // expected-warning {{variables 'a' and 'b' used in loop condition not modified i… in test4()
127for (; a + b + c;); // expected-warning {{variables 'a', 'b', and 'c' used in loop condition not … in test4()
128for (; a + b + c + d;); // expected-warning {{variables 'a', 'b', 'c', and 'd' used in loop condi… in test4()
129for (; a + b + c + d + e;); // expected-warning {{variables used in loop condition not modified i… in test4()
130for (; a + b + c + d + e + f;); // expected-warning {{variables used in loop condition not modifi… in test4()
131for (; a + c + d + b;); // expected-warning {{variables 'a', 'c', 'd', and 'b' used in loop condi… in test4()
132for (; d + c + b + a;); // expected-warning {{variables 'd', 'c', 'b', and 'a' used in loop condi… in test4()
136 // in the conditional.
138 for (int a; a+a+a+a+a+a+a+a+a+a;); // \ in test5()
139 // expected-warning {{variable 'a' used in loop condition not modified in loop body}} in test5()
140 for (int a; a+a+a+a+a+a+a+a+a+a+a;); // \ in test5()
141 // expected-warning {{variable 'a' used in loop condition not modified in loop body}} in test5()
142 for (int a; a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a;); // \ in test5()
143 // expected-warning {{variable 'a' used in loop condition not modified in loop body}} in test5()
144 for (int a; a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a;);//\ in test5()
145 // expected-warning {{variable 'a' used in loop condition not modified in loop body}} in test5()
152 for (;x6;); in test6()
153 for (;y;); in test6()
158 for (;;i++) { // expected-note{{incremented here}} in test7()
160 i++; // expected-warning{{incremented both}} in test7()
162 for (;;i++) { // expected-note{{incremented here}} in test7()
164 ++i; // expected-warning{{incremented both}} in test7()
166 for (;;++i) { // expected-note{{incremented here}} in test7()
168 i++; // expected-warning{{incremented both}} in test7()
170 for (;;++i) { // expected-note{{incremented here}} in test7()
171 ++i; // expected-warning{{incremented both}} in test7()
174 for (;;i--) { // expected-note{{decremented here}} in test7()
176 i--; // expected-warning{{decremented both}} in test7()
178 for (;;i--) { // expected-note{{decremented here}} in test7()
180 --i; // expected-warning{{decremented both}} in test7()
182 for (;;--i) { // expected-note{{decremented here}} in test7()
184 i--; // expected-warning{{decremented both}} in test7()
186 for (;;--i) { // expected-note{{decremented here}} in test7()
187 --i; // expected-warning{{decremented both}} in test7()
191 for (;;++i) in test7()
193 for (;;--i) in test7()
194 --i; in test7()
197 for (;;i++) { in test7()
201 for (;;i--) { in test7()
203 i--; in test7()
210 iterator operator--() { return *this; } in operator --()
211 iterator operator--(int) { return *this; } in operator --()
215 for (;;i++) { // expected-note{{incremented here}} in test8()
217 i++; // expected-warning{{incremented both}} in test8()
219 for (;;i++) { // expected-note{{incremented here}} in test8()
221 ++i; // expected-warning{{incremented both}} in test8()
223 for (;;++i) { // expected-note{{incremented here}} in test8()
225 i++; // expected-warning{{incremented both}} in test8()
227 for (;;++i) { // expected-note{{incremented here}} in test8()
228 ++i; // expected-warning{{incremented both}} in test8()
231 for (;;i--) { // expected-note{{decremented here}} in test8()
233 i--; // expected-warning{{decremented both}} in test8()
235 for (;;i--) { // expected-note{{decremented here}} in test8()
237 --i; // expected-warning{{decremented both}} in test8()
239 for (;;--i) { // expected-note{{decremented here}} in test8()
241 i--; // expected-warning{{decremented both}} in test8()
243 for (;;--i) { // expected-note{{decremented here}} in test8()
244 --i; // expected-warning{{decremented both}} in test8()
248 for (;;++i) in test8()
250 for (;;--i) in test8()
251 --i; in test8()
254 for (;;i++) { in test8()
258 for (;;i--) { in test8()
260 i--; in test8()
267 for (int i = 0; int x = f(i); ++i) {} in test9()