summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/RegionStore.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-09-24 06:24:32 +0000
committerTed Kremenek <kremenek@apple.com>2009-09-24 06:24:32 +0000
commit1b40e5978fa37033a776712fc3c0b9e39befb7f4 (patch)
treee65d45b3ab43449f3d27d15a677c8eb5722c9735 /clang/lib/Analysis/RegionStore.cpp
parent00dd448cffea27e58e0e4ecdc70257af6dda419c (diff)
downloadbcm5719-llvm-1b40e5978fa37033a776712fc3c0b9e39befb7f4.tar.gz
bcm5719-llvm-1b40e5978fa37033a776712fc3c0b9e39befb7f4.zip
Fix crash in RegionStoreManager::Bind() by using 'getAs<PointerType>()' instead of 'cast<PointerType>()' (to handle pointer typedefs).
llvm-svn: 82686
Diffstat (limited to 'clang/lib/Analysis/RegionStore.cpp')
-rw-r--r--clang/lib/Analysis/RegionStore.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp
index 31f52a55b3d..75907da55ec 100644
--- a/clang/lib/Analysis/RegionStore.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud