зеркало из https://github.com/microsoft/clang-1.git
The second check point in the old test case was invalid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101983 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
5fae1d67ac
Коммит
48fb322305
|
@ -1,12 +1,14 @@
|
|||
// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-store region -verify %s
|
||||
|
||||
void f1() {
|
||||
int *n1 = new int;
|
||||
if (*n1) { // expected-warning {{Branch condition evaluates to a garbage value}}
|
||||
}
|
||||
|
||||
int *n2 = new int(3);
|
||||
if (*n2) { // no-warning
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче