From 27e05edb8a62c77e2c7512989da663777ea905e3 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 19 Nov 2009 19:04:08 +0000 Subject: [PATCH] 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 --- lib/Analysis/Store.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; } -- 2.40.0