mirror of
https://github.com/opnsense/src.git
synced 2026-02-28 12:20:54 -05:00
15 lines
287 B
C++
15 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
|
|
}
|
|
}
|
|
|