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