diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-07-18 05:02:33 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-07-18 05:02:33 +0000 |
commit | 6ab0a74a25ea4add5c7f1a502e898198a95176a6 (patch) | |
tree | 802ea747626889402e62db3dd1407448b99630ac | |
parent | 090db9b7a90591b0ec18cc2c7f0aad4a8766a2bb (diff) | |
download | bcm5719-llvm-6ab0a74a25ea4add5c7f1a502e898198a95176a6.tar.gz bcm5719-llvm-6ab0a74a25ea4add5c7f1a502e898198a95176a6.zip |
Add test case for bug fix in r76262.
llvm-svn: 76283
-rw-r--r-- | clang/test/Analysis/misc-ps-region-store.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Analysis/misc-ps-region-store.m b/clang/test/Analysis/misc-ps-region-store.m index c5341a01388..2b0299f23f0 100644 --- a/clang/test/Analysis/misc-ps-region-store.m +++ b/clang/test/Analysis/misc-ps-region-store.m @@ -125,3 +125,17 @@ void testB_2(BStruct *b) { if ((int*)~0 != __gruev__) {} } } + +// This test case is a reduced case of a caching bug discovered by an +// assertion failure in RegionStoreManager::BindArray. Essentially the +// DeclStmt is evaluated twice, but on the second loop iteration the +// engine caches out. Previously a false transition would cause UnknownVal +// to bind to the variable, firing an assertion failure. This bug was fixed +// in r76262. +void test_declstmt_caching() { +again: + { + const char a[] = "I like to crash"; + goto again; + } +} |