Lines Matching full:uninitialized
1 // RUN: %clang_cc1 -fsyntax-only -Wuninitialized -Wconditional-uninitialized -fsyntax-only -fblocks…
8 return x; // expected-warning{{variable 'x' is uninitialized when used here}} in test1()
24 ++x; // expected-warning{{variable 'x' is uninitialized when used here}} in test4()
30 x = y; // expected-warning{{variable 'y' is uninitialized when used here}} in test5()
36 x += 2; // expected-warning{{variable 'x' is uninitialized when used here}} in test6()
42 …if (y) // expected-warning{{variable 'x' is used uninitialized whenever 'if' condition is false}} \ in test7()
45 return x; // expected-note{{uninitialized use occurs here}} in test7()
52 // Warn with "may be uninitialized" here (not "is sometimes uninitialized"), in test7b()
55 return x; // expected-warning{{variable 'x' may be uninitialized when used here}} in test7b()
74 return x; // expected-warning{{variable 'x' may be uninitialized when used here}} in test9()
82 return x; // expected-warning{{variable 'x' may be uninitialized when used here}} in test10()
90 return x; // expected-warning{{variable 'x' may be uninitialized when used here}} in test11()
94 …for (unsigned i ; n ; ++i) ; // expected-warning{{variable 'i' is uninitialized when used here}} e… in test12()
115 …int x = x; // expected-warning {{variable 'x' is uninitialized when used within its own initializa… in test15b()
128 // Don't warn multiple times about the same uninitialized variable in test17()
131 *x = 1; // expected-warning{{variable 'x' is uninitialized when used here}} in test17()
155 …ux1()) || test19_aux3(&z)) // expected-warning {{variable 'z' is used uninitialized whenever '||' … in test20()
156 return z; // expected-note {{uninitialized use occurs here}} in test20()
162 …aux3(&z) || test19_aux2()) // expected-warning {{variable 'z' is used uninitialized whenever '||' … in test21()
163 return z; // expected-note {{uninitialized use occurs here}} in test21()
181 // The basic uninitialized value analysis doesn't have enough path-sensitivity
191 return val; // expected-warning{{variable 'val' may be uninitialized when used here}} in test24()
196 return x; // expected-warning{{variable 'x' is uninitialized when used here}} in test25()
202 return x; // expected-warning{{variable 'x' is uninitialized when used here}} in test26()
213 return sizeof(int[len]); // expected-warning{{variable 'len' is uninitialized when used here}} in test28()
218 (void) ^{ (void) x; }; // expected-warning{{variable 'x' is uninitialized when captured by block}} in test29()
244 return x; // expected-warning{{variable 'x' is uninitialized when used here}} in test_34()
259 goto *pc; // expected-warning{{variable 'pc' is uninitialized when used here}} in test36()
286 int z = x + y; // expected-warning {{variable 'y' is uninitialized when used here}} in test39()
293 return x ? 1 : y; // expected-warning {{variable 'y' is uninitialized when used here}} in test40()
298 …if (x) y = 1; // expected-warning{{variable 'y' is used uninitialized whenever 'if' condition is f… in test41()
300 return y; // expected-note{{uninitialized use occurs here}} in test41()
312 test43_aux(x++); // expected-warning {{variable 'x' is uninitialized when used here}} in test43()
320 x += y; // expected-warning {{variable 'y' is uninitialized when used here}} in test44()
334 int j = i ? : 1; // expected-warning {{variable 'i' is uninitialized when used here}} in test46()
373 return x; // expected-warning {{variable 'x' may be uninitialized when used here}} in test52()
378 int y = (x); // expected-warning {{variable 'x' is uninitialized when used here}} in test53()
381 // This CFG caused the uninitialized values warning to inf-loop.
392 *len += new_len; // expected-warning {{variable 'new_len' may be uninitialized when used here}} in PR10379_f()
424 // Test uninitialized value used in loop condition.
427 for (; i < 10000; ++i) // expected-warning {{variable 'i' is uninitialized when used here}} in rdar9432305()
435 UNINIT(int, a, b); // expected-warning {{variable 'a' is uninitialized when used here}} \ in test54()
438 ASSIGN(int, c, d); // expected-warning {{variable 'c' is uninitialized when used here}} in test54()
450 consume(k); // expected-warning {{variable 'k' is uninitialized}} in uninit_in_loop()
462 // FIXME: This should produce the 'is uninitialized' diagnostic, but we in uninit_in_loop_goto()
465 consume(k); // expected-warning {{variable 'k' may be uninitialized}} in uninit_in_loop_goto()
477 if (!a) { // expected-warning {{variable 'a' is uninitialized}} in returns_twice()
492 sum += arr[i]; // expected-warning {{variable 'sum' is uninitialized}} in compound_assign()
498 return x += 1; // expected-warning {{variable 'x' is uninitialized}} in compound_assign_2()
503 x *= 0; // expected-warning {{variable 'x' is uninitialized}} in compound_assign_3()
521 ++x; // expected-warning {{variable 'x' is uninitialized when used here}} in test_analyzer_noreturn()