Add test for path-sensitive uninit-val detection involving struct field.

llvm-svn: 59620
This commit is contained in:
Zhongxing Xu 2008-11-19 11:10:42 +00:00
parent e5816f213d
commit 16a92afc4b
1 changed files with 18 additions and 0 deletions

View File

@ -41,3 +41,21 @@ int f3(void) {
else
return 1;
}
// RUN: clang -checker-simple -analyzer-store-region -verify %s
struct s {
int data;
};
struct s global;
void g(int);
void f4() {
int a;
if (global.data == 0)
a = 3;
if (global.data == 0)
g(a); // no-warning
}