[analyzer] Address John's code review for r163407.
Teach malloc sizeof checker to find type inconsistencies in multi-
dimensional arrays.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163438 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/malloc-sizeof.c b/test/Analysis/malloc-sizeof.c
index 943c4ce..7a8585f 100644
--- a/test/Analysis/malloc-sizeof.c
+++ b/test/Analysis/malloc-sizeof.c
@@ -37,9 +37,11 @@
int *mallocArraySize() {
static const int sTable[10];
- static const int nestedTable[10][10];
+ static const int nestedTable[10][2];
int *table = malloc(sizeof sTable);
int *table1 = malloc(sizeof nestedTable);
+ int (*table2)[2] = malloc(sizeof nestedTable);
+ int (*table3)[10][2] = malloc(sizeof nestedTable);
return table;
}