aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/Store.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-09-01 23:00:46 +0000
committerTed Kremenek <kremenek@apple.com>2010-09-01 23:00:46 +0000
commit1e4a32acfad6a9f4cf555fdbc5c6c44c558b9fcb (patch)
treeb2f92470c4383d3cf141c4be7b5d707e56d90aee /lib/Checker/Store.cpp
parent710672485039d3dd355748876299fff88e8ad84c (diff)
Don't assert in the analyzer when analyze code does a byte load from a function's address. Fixes PR 8052.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112761 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/Store.cpp')
-rw-r--r--lib/Checker/Store.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/Checker/Store.cpp b/lib/Checker/Store.cpp
index 7c80eed0ea..1cb5cd70ca 100644
--- a/lib/Checker/Store.cpp
+++ b/lib/Checker/Store.cpp
@@ -101,17 +101,10 @@ const MemRegion *StoreManager::CastRegion(const MemRegion *R, QualType CastToTy)
assert(0 && "Invalid region cast");
break;
}
-
+
case MemRegion::FunctionTextRegionKind:
case MemRegion::BlockTextRegionKind:
- case MemRegion::BlockDataRegionKind: {
- // CodeTextRegion should be cast to only a function or block pointer type,
- // although they can in practice be casted to anything, e.g, void*, char*,
- // etc.
- // Just return the region.
- return R;
- }
-
+ case MemRegion::BlockDataRegionKind:
case MemRegion::StringRegionKind:
// FIXME: Need to handle arbitrary downcasts.
case MemRegion::SymbolicRegionKind: