Ted Kremenek | cdc3a89 | 2012-08-24 20:39:55 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region %s |
Zhongxing Xu | 143b2fc | 2009-06-16 09:55:50 +0000 | [diff] [blame] | 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. | ||||
8 | void f() { | ||||
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 | } |