diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-03-22 21:42:31 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-03-22 21:42:31 +0000 |
commit | 5aac0b6ae95f137b1783f3e6227241fb457b8f8b (patch) | |
tree | 5383ff9509cccf706c2301c1ac4c61cc7bec1f57 /test/Analysis | |
parent | 638e2d31fceed041e7e16aada4188c94cb5797bb (diff) |
Fix static analyzer crash on code taking the address of a field. Fixes PR 11146.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r-- | test/Analysis/misc-ps-region-store.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Analysis/misc-ps-region-store.cpp b/test/Analysis/misc-ps-region-store.cpp index 00dff70480..e0cedcce93 100644 --- a/test/Analysis/misc-ps-region-store.cpp +++ b/test/Analysis/misc-ps-region-store.cpp @@ -552,3 +552,19 @@ void PR11545_positive() { } } +// Test handling taking the address of a field. While the analyzer +// currently doesn't do anything intelligent here, this previously +// resulted in a crash. +class PR11146 { +public: + struct Entry; + void baz(); +}; + +struct PR11146::Entry { + int x; +}; + +void PR11146::baz() { + (void) &Entry::x; +} |