mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-15 12:39:19 +00:00
1c8f999e0b
iAs listed in the summary D77846, we have 5 different categories of bugs we're checking for in CallAndMessage. I think the documentation placed in the code explains my thought process behind my decisions quite well. A non-obvious change I had here is removing the entry for CallAndMessageUnInitRefArg. In fact, I removed the CheckerNameRef typed field back in D77845 (it was dead code), so that checker didn't really exist in any meaningful way anyways. Differential Revision: https://reviews.llvm.org/D77866
16 lines
350 B
C++
16 lines
350 B
C++
// RUN: %clang_analyze_cc1 %s -verify \
|
|
// RUN: -analyzer-checker=core \
|
|
// RUN: -analyzer-config core.CallAndMessage:ArgPointeeInitializedness=true
|
|
|
|
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);
|
|
}
|