summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/elementtype.c
blob: 7eba8e14b3a7f48e5d75aaee9c79e37fbdab24bc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core -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;
  }
}