forked from OSchip/llvm-project
Add test for path-sensitive uninit-val detection involving struct field.
llvm-svn: 59620
This commit is contained in:
parent
e5816f213d
commit
16a92afc4b
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue