| 1 | // RUN: %clang_analyze_cc1 -std=c++11 -analyzer-checker=core,alpha.core.CallAndMessageUnInitRefArg %s -verify |
|---|---|
| 2 | |
| 3 | void f(const int *end); |
| 4 | |
| 5 | void g(const int (&arrr)[10]) { |
| 6 | f(arrr); // expected-warning{{1st function call argument is a pointer to uninitialized value}} |
| 7 | } |
| 8 | |
| 9 | void h() { |
| 10 | int arr[10]; |
| 11 | |
| 12 | g(arr); |
| 13 | } |
| 14 |