Home | History | Annotate | Download | only in Analysis
      1 // RUN: %clang_cc1 -analyze -analyzer-checker=core,experimental.core %s -analyzer-store=region -verify
      2 
      3 typedef int bar_return_t;
      4 typedef struct {
      5   unsigned char int_rep;
      6 } Foo_record_t;
      7 extern Foo_record_t Foo_record;
      8 struct QuxSize {};
      9 typedef struct QuxSize QuxSize;
     10 typedef struct {
     11   Foo_record_t Foo;
     12   QuxSize size[0];
     13 } __Request__SetPortalSize_t;
     14 
     15 double __Foo_READSWAP__double(double*);
     16 
     17 static __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