aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-09-27 20:45:21 +0000
committerTed Kremenek <kremenek@apple.com>2009-09-27 20:45:21 +0000
commit8780679b02bea5ab6360f3f8ebf3b221aaeda93f (patch)
treec9a0f9eb4bc2acdfb1b1f347cd0d2f85deffe238 /test/Analysis
parent50755b0dcc81eed9dcf27abe9162527013f26bd4 (diff)
Fix:
<rdar://problem/6914474> checker doesn't realize that variable might have been assigned if a pointer to that variable was passed to another function via a structure The problem here was the RegionStoreManager::InvalidateRegion didn't invalidate the bindings of invalidated regions. This required a rewrite of this method using a worklist. As part of this fix, changed ValueManager::getConjuredSymbolVal() to require a 'void*' SymbolTag argument. This tag is used to differentiate two different symbols created at the same location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r--test/Analysis/misc-ps-region-store.m12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Analysis/misc-ps-region-store.m b/test/Analysis/misc-ps-region-store.m
index dd1e6455f0..76084d5c9e 100644
--- a/test/Analysis/misc-ps-region-store.m
+++ b/test/Analysis/misc-ps-region-store.m
@@ -237,3 +237,15 @@ void rdar_7249327(unsigned int A[2*32]) {
x += *b++; // no-warning
}
+// <rdar://problem/6914474> - Check that 'x' is invalidated because its
+// address is passed in as a value to a struct.
+struct doodad_6914474 { int *v; };
+extern void prod_6914474(struct doodad_6914474 *d);
+int rdar_6914474(void) {
+ int x;
+ struct doodad_6914474 d;
+ d.v = &x;
+ prod_6914474(&d);
+ return x; // no-warning
+}
+