teak-llvm/clang/test/Analysis/PR40625.cpp
Adam Balogh 55725785d2 [Analyzer] Fix for test file of bug 40625
Test fixed and changed to true positive, FIXME about false positive removed.

llvm-svn: 354127
2019-02-15 12:33:42 +00:00

14 lines
308 B
C++

// 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);
}