aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/elementtype.c
blob: f3eee26342411cd7b3c1d1e6bb7ee0dfee1c410d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region %s

typedef struct added_obj_st {
  int type;
} ADDED_OBJ;

// Test if we are using the canonical type for ElementRegion.
void f() {
  ADDED_OBJ *ao[4]={((void*)0),((void*)0),((void*)0),((void*)0)};
  if (ao[0] != ((void*)0))   {
    ao[0]->type=0;
  }
}