]> granicus.if.org Git - clang/commitdiff
Refactor variables unused under non-assert builds.
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 16 Jan 2012 05:16:03 +0000 (05:16 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 16 Jan 2012 05:16:03 +0000 (05:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148229 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExpr.cpp
lib/StaticAnalyzer/Core/RegionStore.cpp

index e2a9404d215f9f7b76bc5ca637caafd3c020299e..39161ea88dba318797dd79e725a3ba585f18201c 100644 (file)
@@ -6861,7 +6861,6 @@ QualType Sema::CheckVectorCompareOperands(ExprResult &LHS, ExprResult &RHS,
     return vType;
 
   QualType LHSType = LHS.get()->getType();
-  QualType RHSType = RHS.get()->getType();
 
   // If AltiVec, the comparison results in a numeric type, i.e.
   // bool for C++, int for C
@@ -6886,7 +6885,7 @@ QualType Sema::CheckVectorCompareOperands(ExprResult &LHS, ExprResult &RHS,
 
   // Check for comparisons of floating point operands using != and ==.
   if (!IsRelational && LHSType->hasFloatingRepresentation()) {
-    assert (RHSType->hasFloatingRepresentation());
+    assert (RHS.get()->getType()->hasFloatingRepresentation());
     CheckFloatComparison(Loc, LHS.get(), RHS.get());
   }
 
index f27c51880be1bcc7d36174756600210f399f8ace..30bb9243b0b36a103df467ab3cf2f12f199a9f3e 100644 (file)
@@ -1314,8 +1314,7 @@ SVal RegionStoreManager::getBindingForLazySymbol(const TypedValueRegion *R) {
 
 SVal RegionStoreManager::getBindingForStruct(Store store, 
                                         const TypedValueRegion* R) {
-  QualType T = R->getValueType();
-  assert(T->isStructureOrClassType());
+  assert(R->getValueType()->isStructureOrClassType());
   return svalBuilder.makeLazyCompoundVal(StoreRef(store, *this), R);
 }