r326234 - [analyzer] Remove redundant check

George Karpenkov via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 27 11:28:53 PST 2018


Author: george.karpenkov
Date: Tue Feb 27 11:28:52 2018
New Revision: 326234

URL: http://llvm.org/viewvc/llvm-project?rev=326234&view=rev
Log:
[analyzer] Remove redundant check

There is no point in assigning void just to crash on it in the next line

Differential Revision: https://reviews.llvm.org/D43802

Modified:
    cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp?rev=326234&r1=326233&r2=326234&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp Tue Feb 27 11:28:52 2018
@@ -1401,8 +1401,6 @@ SVal RegionStoreManager::getBinding(Regi
         T = TR->getLocationType()->getPointeeType();
       else if (const SymbolicRegion *SR = dyn_cast<SymbolicRegion>(MR))
         T = SR->getSymbol()->getType()->getPointeeType();
-      else if (isa<AllocaRegion>(MR))
-        T = Ctx.VoidTy;
     }
     assert(!T.isNull() && "Unable to auto-detect binding type!");
     assert(!T->isVoidType() && "Attempting to dereference a void pointer!");




More information about the cfe-commits mailing list