diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-04-05 05:56:31 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-04-05 05:56:31 +0000 |
commit | b98b998e9a5637012ab39ad1dabdad7c798721e8 (patch) | |
tree | 2e3a807f9cf35474255402a9cf999c8591084d95 /test/Analysis | |
parent | 04a18c9f42e91db1b2d2c7483723c1cd321c3d39 (diff) |
Handle symbolicating a reference in an initializer expression that we don't understand.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154084 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r-- | test/Analysis/misc-ps-region-store.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Analysis/misc-ps-region-store.cpp b/test/Analysis/misc-ps-region-store.cpp index e0cedcce93..8d75fb8ef3 100644 --- a/test/Analysis/misc-ps-region-store.cpp +++ b/test/Analysis/misc-ps-region-store.cpp @@ -568,3 +568,13 @@ struct PR11146::Entry { void PR11146::baz() { (void) &Entry::x; } + +// Test symbolicating a reference. In this example, the +// analyzer (originally) didn't know how to handle x[index - index2], +// returning an UnknownVal. The conjured symbol wasn't a location, +// and would result in a crash. +void rdar10924675(unsigned short x[], int index, int index2) { + unsigned short &y = x[index - index2]; + if (y == 0) + return; +} |