rdar-6442306-1.m revision f7a0cf426eddae76e1a71dd2295631a2cf0560af
1// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=basic -verify &&
2// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=region -verify
3
4typedef int bar_return_t;
5typedef struct {
6  unsigned char int_rep;
7} Foo_record_t;
8extern Foo_record_t Foo_record;
9struct QuxSize {};
10typedef struct QuxSize QuxSize;
11typedef struct {
12  Foo_record_t Foo;
13  QuxSize size;
14} __Request__SetPortalSize_t;
15
16static __inline__ bar_return_t
17__Beeble_check__Request__SetPortalSize_t(__attribute__((__unused__)) __Request__SetPortalSize_t *In0P) {
18  if (In0P->Foo.int_rep != Foo_record.int_rep) {
19    do {
20      int __i__, __C__ = (2);
21      for (__i__ = 0;
22           __i__ < __C__;
23           __i__++) do {
24        *(&((double *)(&In0P->size))[__i__]) =
25          __Foo_READSWAP__double(&((double *)(&In0P->size))[__i__]);
26      }
27      while (0);
28    }
29    while (0);
30  }
31  return 0;
32}
33