diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-09-24 06:24:32 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-09-24 06:24:32 +0000 |
commit | 35dcad8aeef4fc499ab4f057cf40a5da3cc0ee45 (patch) | |
tree | 46b94052470206a59b4f096171b93c198e593210 /lib/Analysis | |
parent | ffbdefc7a24c01a0f77425423278774796a3aa53 (diff) |
Fix crash in RegionStoreManager::Bind() by using 'getAs<PointerType>()' instead of 'cast<PointerType>()' (to handle pointer typedefs).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82686 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/RegionStore.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index 31f52a55b3..75907da55e 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -1322,7 +1322,7 @@ const GRState *RegionStoreManager::Bind(const GRState *state, Loc L, SVal V) { // Binding directly to a symbolic region should be treated as binding // to element 0. QualType T = SR->getSymbol()->getType(getContext()); - T = cast<PointerType>(T)->getPointeeType(); + T = T->getAs<PointerType>()->getPointeeType(); R = GetElementZeroRegion(SR, T); } |