| // RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux %s |
| #include "Inputs/system-header-simulator.h" |
| #define __GFP_ZERO 0x8000 |
| void *kmalloc(size_t, int); |
| list = kmalloc(sizeof(*list) * 10, __GFP_ZERO); |
| for (i = 0; i < 10; i++) { |
| free(list); // no-warning |
| list = kmalloc(sizeof(*list) * 10, 0); |
| for (i = 0; i < 10; i++) { |
| t = list[i]; // expected-warning{{undefined}} |
| void test_indeterminate(int flags) { |
| list = kmalloc(sizeof(*list) * 10, flags); |
| for (i = 0; i < 10; i++) { |
| t = list[i]; // expected-warning{{undefined}} |