blob: 900a6d6869acc8dcd5db4fee006a59fde4228765 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=basic -verify &&
Ted Kremeneka8607d12009-05-01 19:22:20 +00002// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=region -verify
Ted Kremenek5c456fe2008-10-18 03:28:48 +00003
4unsigned foo();
5typedef struct bf { unsigned x:2; } bf;
6void bar() {
7 bf y;
8 *(unsigned*)&y = foo();
9 y.x = 1;
10}
Zhongxing Xu5414a5c2009-06-21 13:24:24 +000011
12struct s {
13 int n;
14};
15
16void f() {
17 struct s a;
18 int *p = &(a.n) + 1;
19}