From: Ted Kremenek Date: Thu, 19 Nov 2009 19:04:08 +0000 (+0000) Subject: Only fetch the ASTContext object within the assertion. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=27e05edb8a62c77e2c7512989da663777ea905e3;p=clang 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 bbf0c46bf2..4183a73158 100644 --- a/lib/Analysis/Store.cpp +++ b/lib/Analysis/Store.cpp @@ -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; }