clang/test/Analysis/PR40625.cpp
raw| 1 | // RUN: %clang_analyze_cc1 %s -verify \ |
| 2 | // RUN: -analyzer-checker=core \ |
| 3 | // RUN: -analyzer-config core.CallAndMessage:ArgPointeeInitializedness=true |
| 4 | |
| 5 | void f(const int *end); |
| 6 | |
| 7 | void g(const int (&arrr)[10]) { |
| 8 | f(arrr); // expected-warning{{1st function call argument is a pointer to uninitialized value}} |
| 9 | } |
| 10 | |
| 11 | void h() { |
| 12 | int arr[10]; |
| 13 | |
| 14 | g(arr); |
| 15 | } |