blob: 0c0923d71b5e96130d59b77502ff9ca5f70deb29 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=basic -verify &&
Ted Kremeneke1cea752009-07-06 21:58:46 +00002// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=basic-new-cast -verify &&
Daniel Dunbard7d5f022009-03-24 02:24:46 +00003// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=region -verify
Ted Kremenekabb042f2008-12-13 19:24:37 +00004
5typedef int bar_return_t;
6typedef struct {
7 unsigned char int_rep;
8} Foo_record_t;
9extern Foo_record_t Foo_record;
10struct QuxSize {};
11typedef struct QuxSize QuxSize;
12typedef struct {
13 Foo_record_t Foo;
14 QuxSize size;
15} __Request__SetPortalSize_t;
16
17static __inline__ bar_return_t
18__Beeble_check__Request__SetPortalSize_t(__attribute__((__unused__)) __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}