Clang Project

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