]> granicus.if.org Git - clang/commitdiff
Only fetch the ASTContext object within the assertion.
authorTed Kremenek <kremenek@apple.com>
Thu, 19 Nov 2009 19:04:08 +0000 (19:04 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 19 Nov 2009 19:04:08 +0000 (19:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89375 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/Store.cpp

index bbf0c46bf29bace03bc5c7719d7cb9e63328abc4..4183a73158b5001831e6ac61347720df774ef82e 100644 (file)
@@ -194,13 +194,11 @@ const MemRegion *StoreManager::CastRegion(const MemRegion *R, QualType CastToTy)
 ///  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;
 }