diff options
Diffstat (limited to 'test/Analysis/elementtype.c')
-rw-r--r-- | test/Analysis/elementtype.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Analysis/elementtype.c b/test/Analysis/elementtype.c new file mode 100644 index 000000000000..10328e69efa2 --- /dev/null +++ b/test/Analysis/elementtype.c @@ -0,0 +1,13 @@ +// RUN: clang-cc -analyze -checker-simple -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; + } +} |