summaryrefslogtreecommitdiff
path: root/test/Analysis/PR40625.cpp
blob: 6cc27d39b6c089fbf0fbf37054e249186350f96c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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+sizeof(arrr)); // expected-warning{{1st function call argument is a pointer to uninitialized value}}
  // FIXME: This is a false positive that should be fixed. Until then this
  //        tests the crash fix in FindLastStoreBRVisitor (beside
  //        uninit-vals.m).
}

void h() {
  int arr[10];

  g(arr);
}