summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/PR40625.cpp
blob: ac23a71c1c6a89a08b563c8986ecb92f4035d229 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_analyze_cc1 -std=c++11 -analyzer-checker=core,alpha.core.CallAndMessageUnInitRefArg  %s -verify

void f(const int *end);

void g(const int (&arrr)[10]) {
  f(arrr); // expected-warning{{1st function call argument is a pointer to uninitialized value}}
}

void h() {
  int arr[10];

  g(arr);
}
OpenPOWER on IntegriCloud