2009-03-24 10:24:46 +08:00
|
|
|
// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=basic -verify &&
|
2009-07-07 05:58:46 +08:00
|
|
|
// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=basic-new-cast -verify &&
|
2009-05-02 03:22:20 +08:00
|
|
|
// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=region -verify
|
2008-10-18 11:28:48 +08:00
|
|
|
|
|
|
|
unsigned foo();
|
|
|
|
typedef struct bf { unsigned x:2; } bf;
|
|
|
|
void bar() {
|
|
|
|
bf y;
|
|
|
|
*(unsigned*)&y = foo();
|
|
|
|
y.x = 1;
|
|
|
|
}
|
2009-06-21 21:24:24 +08:00
|
|
|
|
|
|
|
struct s {
|
|
|
|
int n;
|
|
|
|
};
|
|
|
|
|
|
|
|
void f() {
|
|
|
|
struct s a;
|
|
|
|
int *p = &(a.n) + 1;
|
|
|
|
}
|