summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/misc-ps-region-store.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/misc-ps-region-store.m')
-rw-r--r--clang/test/Analysis/misc-ps-region-store.m17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/Analysis/misc-ps-region-store.m b/clang/test/Analysis/misc-ps-region-store.m
index 5544432f463..18ec0b39785 100644
--- a/clang/test/Analysis/misc-ps-region-store.m
+++ b/clang/test/Analysis/misc-ps-region-store.m
@@ -1237,3 +1237,20 @@ void pr9048(pr9048_cdev_t dev, struct pr9048_diskslices * ssp, unsigned int slic
}
}
+// Test Store reference counting in the presence of Lazy compound values.
+// This previously caused an infinite recursion.
+typedef struct {} Rdar_9103310_A;
+typedef struct Rdar_9103310_B Rdar_9103310_B_t;
+struct Rdar_9103310_B {
+ unsigned char Rdar_9103310_C[101];
+};
+void Rdar_9103310_E(Rdar_9103310_A * x, struct Rdar_9103310_C * b) { // expected-warning {{declaration of 'struct Rdar_9103310_C' will not be visible outside of this function}}
+ char Rdar_9103310_D[4][4] = { "a", "b", "c", "d"};
+ int i;
+ Rdar_9103310_B_t *y = (Rdar_9103310_B_t *) x;
+ for (i = 0; i < 101; i++) {
+ Rdar_9103310_F(b, "%2d%s ", (y->Rdar_9103310_C[i]) / 4, Rdar_9103310_D[(y->Rdar_9103310_C[i]) % 4]); // expected-warning {{implicit declaration of function 'Rdar_9103310_F' is invalid in C99}}
+ }
+}
+
+
OpenPOWER on IntegriCloud