From cfe4ff9725c8f42f14627f6da433cf0b3fdcfcff Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 29 Nov 2011 19:39:29 +0000 Subject: 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 --- clang/test/Analysis/misc-ps-region-store.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'clang/test/Analysis/misc-ps-region-store.cpp') 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; +} + -- cgit v1.2.3