]> granicus.if.org Git - clang/commitdiff
Simplify assertion.
authorTed Kremenek <kremenek@apple.com>
Wed, 10 Mar 2010 19:09:37 +0000 (19:09 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 10 Mar 2010 19:09:37 +0000 (19:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98176 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Checker/RegionStore.cpp

index b32017032504ade850fe8a30d0a42690c2429c76..b53fdee138c3b3313d295ce040fec38fbbc5ad1d 100644 (file)
@@ -1334,11 +1334,7 @@ SVal RegionStoreManager::RetrieveLazySymbol(const TypedRegion *R) {
 SVal RegionStoreManager::RetrieveStruct(Store store, const TypedRegion* R) {
   QualType T = R->getValueType(getContext());
   assert(T->isStructureType());
-
-  const RecordType* RT = T->getAsStructureType();
-  RecordDecl* RD = RT->getDecl();
-  assert(RD->isDefinition());
-  (void)RD;
+  assert(T->getAsStructureType()->getDecl()->isDefinition());
   return ValMgr.makeLazyCompoundVal(store, R);
 }