• Home
  • Raw
  • Download

Lines Matching full:warning

11 …f (x); // expected-warning {{if statement has empty body}} expected-note{{put the semicolon on a s…  in test1()
15 …RO_A); // expected-warning {{if statement has empty body}} expected-note{{put the semicolon on a s… in test1()
16 …== x); // expected-warning {{if statement has empty body}} expected-note{{put the semicolon on a s… in test1()
20 … i++); { // expected-warning{{for loop has empty body}} expected-note{{put the semicolon on a sepa… in test1()
25 …x; i++); // expected-warning{{for loop has empty body}} expected-note{{put the semicolon on a sepa… in test1()
32 …i++); // expected-warning{{for loop has empty body}} expected-note{{put the semicolon on a separat… in test1()
38 …); // expected-warning{{range-based for loop has empty body}} expected-note{{put the semicolon on … in test1()
42 …); // expected-warning{{range-based for loop has empty body}} expected-note{{put the semicolon on … in test1()
45 … == 0); // expected-warning{{while loop has empty body}} expected-note{{put the semicolon on a sep… in test1()
48 …= 0); { // expected-warning{{while loop has empty body}} expected-note{{put the semicolon on a sep… in test1()
52 … == 0); // expected-warning{{while loop has empty body}} expected-note{{put the semicolon on a sep… in test1()
58 … == 0); // expected-warning{{while loop has empty body}} expected-note{{put the semicolon on a sep… in test1()
65 while (b()); // no-warning in test1()
70 … (b()); // expected-warning{{while loop has empty body}} expected-note{{put the semicolon on a sep… in test1()
73 switch(x) // no-warning in test1()
75 …(y); // expected-warning{{switch statement has empty body}} expected-note{{put the semicolon on a … in test1()
88 /// There should be no warning when null statement is placed on its own line.
90 if (x) // no-warning in test2()
91 ; // no-warning in test2()
94 for (i = 0; i < x; i++) // no-warning in test2()
95 ; // no-warning in test2()
99 i++) // no-warning in test2()
100 ; // no-warning in test2()
103 for (int j : arr) // no-warning in test2()
104 ; // no-warning in test2()
106 while (b() == 0) // no-warning in test2()
107 ; // no-warning in test2()
110 c() == 0) // no-warning in test2()
111 ; // no-warning in test2()
115 switch(y) // no-warning in test2()
116 ; // no-warning in test2()
120 while(b() == 0); // no-warning in test2()
123 /// There should be no warning for a null statement resulting from an empty macro.
126 if (x) EMPTY(x); // no-warning in test3()
129 for (i = 0; i < x; i++) EMPTY(i); // no-warning in test3()
133 i++) EMPTY(i); // no-warning in test3()
136 for (int j : arr) EMPTY(j); // no-warning in test3()
139 arr) EMPTY(j); // no-warning in test3()
141 while (b() == 0) EMPTY(i); // no-warning in test3()
144 c() == 0) EMPTY(i); // no-warning in test3()
148 EMPTY(i); // no-warning in test3()
155 switch (x) default:; // no-warning in test4()
158 do {} while (false); // no-warning in test4()
161 /// There should be no warning for a common for/while idiom when it is obvious
165 …x; i++); // expected-warning{{for loop has empty body}} expected-note{{put the semicolon on a sepa… in test5()
168 for (i = 0; i < x; i++); // no-warning in test5()
173 …i++); // expected-warning{{for loop has empty body}} expected-note{{put the semicolon on a separat… in test5()
178 i++); // no-warning in test5()
181 … == 0); // expected-warning{{while loop has empty body}} expected-note{{put the semicolon on a sep… in test5()
184 while (b() == 0); // no-warning in test5()
188 … == 0); // expected-warning{{while loop has empty body}} expected-note{{put the semicolon on a sep… in test5()
192 c() == 0); // no-warning in test5()
196 /// There should be no warning for a statement with a non-null body.
198 if (x) {} // no-warning in test6()
201 a(x); // no-warning in test6()
204 for (i = 0; i < x; i++) // no-warning in test6()
205 a(i); // no-warning in test6()
207 for (i = 0; i < x; i++) { // no-warning in test6()
208 a(i); // no-warning in test6()
213 i++) // no-warning in test6()
214 a(i); // no-warning in test6()
217 for (int j : arr) // no-warning in test6()
220 for (int j : arr) {} // no-warning in test6()
222 while (b() == 0) // no-warning in test6()
223 a(i); // no-warning in test6()
225 while (b() == 0) {} // no-warning in test6()
227 switch(x) // no-warning in test6()
229 switch(y) // no-warning in test6()
244 // no empty body warning. in test_errors()
262 …f (x); // expected-warning{{if statement has empty body}} expected-note{{put the semicolon on a se… in test_template()
265 EMPTY(x); // no-warning in test_template()
268 …); // expected-warning{{range-based for loop has empty body}} expected-note{{put the semicolon on … in test_template()
270 … == 0); // expected-warning{{while loop has empty body}} expected-note{{put the semicolon on a sep… in test_template()
281 if (x) IDENTITY(); // no-warning in test7()