[cfe-commits] r95297 - /cfe/trunk/test/Analysis/misc-ps-region-store.m
Ted Kremenek
kremenek at apple.com
Wed Feb 3 23:25:56 PST 2010
Author: kremenek
Date: Thu Feb 4 01:25:56 2010
New Revision: 95297
URL: http://llvm.org/viewvc/llvm-project?rev=95297&view=rev
Log:
Add assorted test cases from PR 4172.
Modified:
cfe/trunk/test/Analysis/misc-ps-region-store.m
Modified: cfe/trunk/test/Analysis/misc-ps-region-store.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/misc-ps-region-store.m?rev=95297&r1=95296&r2=95297&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/misc-ps-region-store.m (original)
+++ cfe/trunk/test/Analysis/misc-ps-region-store.m Thu Feb 4 01:25:56 2010
@@ -758,3 +758,32 @@
static const struct rdar_7515938_str z = { 0, "hello" };
return &z;
}
+
+//===----------------------------------------------------------------------===//
+// Assorted test cases from PR 4172.
+//===----------------------------------------------------------------------===//
+
+struct PR4172A_s { int *a; };
+
+void PR4172A_f2(struct PR4172A_s *p);
+
+int PR4172A_f1(void) {
+ struct PR4172A_s m;
+ int b[4];
+ m.a = b;
+ PR4172A_f2(&m);
+ return b[3]; // no-warning
+}
+
+struct PR4172B_s { int *a; };
+
+void PR4172B_f2(struct PR4172B_s *p);
+
+int PR4172B_f1(void) {
+ struct PR4172B_s m;
+ int x;
+ m.a = &x;
+ PR4172B_f2(&m);
+ return x; // no-warning
+}
+
More information about the cfe-commits
mailing list