1f51a89d39
These were ignored by git accidentally. We want ALL OF THEM since they all came in the llvm/clang source distribution.
16 lines
287 B
C++
16 lines
287 B
C++
// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store region -verify %s
|
|
// XFAIL: *
|
|
|
|
void f1() {
|
|
int *n = new int;
|
|
if (*n) { // expected-warning {{Branch condition evaluates to a garbage value}}
|
|
}
|
|
}
|
|
|
|
void f2() {
|
|
int *n = new int(3);
|
|
if (*n) { // no-warning
|
|
}
|
|
}
|
|
|