Use getAsRecordType() to get around sugar types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66768 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp
index 84523dc..fbaa302 100644
--- a/lib/Analysis/RegionStore.cpp
+++ b/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())