Use getAsRecordType() to get around sugar types.
llvm-svn: 66768
diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp
index 84523dc..fbaa302 100644
--- a/clang/lib/Analysis/RegionStore.cpp
+++ b/clang/lib/Analysis/RegionStore.cpp
@@ -1127,7 +1127,7 @@
QualType T = R->getRValueType(getContext());
assert(T->isStructureType());
- RecordType* RT = cast<RecordType>(T.getTypePtr());
+ const RecordType* RT = T->getAsRecordType();
RecordDecl* RD = RT->getDecl();
if (!RD->isDefinition())