Only fetch the ASTContext object within the assertion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89375 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/Store.cpp b/lib/Analysis/Store.cpp
index bbf0c46..4183a73 100644
--- a/lib/Analysis/Store.cpp
+++ b/lib/Analysis/Store.cpp
@@ -194,13 +194,11 @@
/// as another region.
SVal StoreManager::CastRetrievedVal(SVal V, const TypedRegion *R,
QualType castTy) {
- ASTContext &Ctx = ValMgr.getContext();
- (void) Ctx;
-
if (castTy.isNull())
return V;
- assert(Ctx.hasSameUnqualifiedType(castTy, R->getValueType(Ctx)));
+ assert(ValMgr.getContext().hasSameUnqualifiedType(castTy,
+ R->getValueType(ValMgr.getContext())));
return V;
}