diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-06-22 08:08:35 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-22 08:08:35 +0000 |
commit | b897c8660c4ff7037dde81b9645737bc1c992abe (patch) | |
tree | b6403365e77095a79062d3379c9e6aea0df5f088 /test/Analysis/elementtype.c | |
parent | 7ef7bab7e3d06f660b059b903c231f100bb13cc5 (diff) |
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; + } +} |