blob: 6cc27d39b6c089fbf0fbf37054e249186350f96c [file] [log] [blame]
Adam Balogh3bd63ae2019-02-13 12:25:47 +00001// 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+sizeof(arrr)); // expected-warning{{1st function call argument is a pointer to uninitialized value}}
7 // FIXME: This is a false positive that should be fixed. Until then this
8 // tests the crash fix in FindLastStoreBRVisitor (beside
9 // uninit-vals.m).
10}
11
12void h() {
13 int arr[10];
14
15 g(arr);
16}