1// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core %s -analyzer-store=region -verify 2 3unsigned foo(); 4typedef struct bf { unsigned x:2; } bf; 5void bar() { 6 bf y; 7 *(unsigned*)&y = foo(); 8 y.x = 1; 9} 10 11struct s { 12 int n; 13}; 14 15void f() { 16 struct s a; 17 int *p = &(a.n) + 1; 18} 19 20typedef struct { 21 int x,y; 22} Point; 23 24Point getit(void); 25void test() { 26 Point p; 27 (void)(p = getit()).x; 28} 29