summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/array-struct.c
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-03-18 02:07:30 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-03-18 02:07:30 +0000
commite40de828fc0fad1294cf1856e480c6602c214159 (patch)
tree367a733cd9ebc8085c0dabb4e6267940f9f143fe /clang/test/Analysis/array-struct.c
parentd00978bc0dac0fa3f521555273f1a6abb63954dc (diff)
downloadbcm5719-llvm-e40de828fc0fad1294cf1856e480c6602c214159.tar.gz
bcm5719-llvm-e40de828fc0fad1294cf1856e480c6602c214159.zip
add test case.
llvm-svn: 67154
Diffstat (limited to 'clang/test/Analysis/array-struct.c')
-rw-r--r--clang/test/Analysis/array-struct.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Analysis/array-struct.c b/clang/test/Analysis/array-struct.c
index 86858d7bd2c..60a3d3118d7 100644
--- a/clang/test/Analysis/array-struct.c
+++ b/clang/test/Analysis/array-struct.c
@@ -104,3 +104,18 @@ void f12(int *list) {
unsigned i = 0;
list[i] = 1;
}
+
+struct s1 {
+ struct s2 {
+ int d;
+ } e;
+};
+
+// The binding of a.e.d should not be removed. Test recursive subregion map
+// building: a->e, e->d. Only then 'a' could be added to live region roots.
+void f13(double timeout) {
+ struct s1 a;
+ a.e.d = (long) timeout;
+ if (a.e.d == 10)
+ a.e.d = 4;
+}
OpenPOWER on IntegriCloud