xref: /llvm-project/clang/test/Analysis/elementtype.c (revision ffe7950ebc62380c3afc7c71f454a1db3f6f5c76)
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core %s
2 
3 typedef struct added_obj_st {
4   int type;
5 } ADDED_OBJ;
6 
7 // Test if we are using the canonical type for ElementRegion.
f(void)8 void f(void) {
9   ADDED_OBJ *ao[4]={((void*)0),((void*)0),((void*)0),((void*)0)};
10   if (ao[0] != ((void*)0))   {
11     ao[0]->type=0;
12   }
13 }
14