diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-11-29 19:39:29 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-11-29 19:39:29 +0000 |
commit | cfe4ff9725c8f42f14627f6da433cf0b3fdcfcff (patch) | |
tree | c57b1147f418abc8204a5f8ef5bb3f3cb4f3aae6 /clang/test/Analysis/misc-ps-region-store.cpp | |
parent | b61cc442650156bfb3be4af72daea46c6fa4b4d0 (diff) | |
download | bcm5719-llvm-cfe4ff9725c8f42f14627f6da433cf0b3fdcfcff.tar.gz bcm5719-llvm-cfe4ff9725c8f42f14627f6da433cf0b3fdcfcff.zip |
Relax RegionStore to allow loads from CodeTextRegions. Apparently you can actually write code that does this. This seems worthy of a checker, but the StoreManager should handle the memory abstraction without crashing. Fixes PR 11450.
llvm-svn: 145424
Diffstat (limited to 'clang/test/Analysis/misc-ps-region-store.cpp')
-rw-r--r-- | clang/test/Analysis/misc-ps-region-store.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Analysis/misc-ps-region-store.cpp b/clang/test/Analysis/misc-ps-region-store.cpp index ec760b06ff8..df90a7562dd 100644 --- a/clang/test/Analysis/misc-ps-region-store.cpp +++ b/clang/test/Analysis/misc-ps-region-store.cpp @@ -484,3 +484,11 @@ void PR11249() *p = 0xDEADBEEF; // no-warning } +// Handle doing a load from the memory associated with the code for +// a function. +extern double nan( const char * ); +double PR11450() { + double NaN = *(double*) nan; + return NaN; +} + |