add test case for PR3135 which was already fixed

llvm-svn: 86273
This commit is contained in:
Nuno Lopes 2009-11-06 18:42:13 +00:00
parent d91a7960bf
commit ac5eba93ca
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
// PR3135
typedef struct {
int *a;
} structure;
int bar(structure *x);
int foo()
{
int x;
structure y = {&x};
// the call to bar may initialize x
if (bar(&y) && x) // no-warning
return 1;
return 0;
}