]> granicus.if.org Git - clang/commitdiff
[analyzer] Remove redundant check
authorGeorge Karpenkov <ekarpenkov@apple.com>
Tue, 27 Feb 2018 19:28:52 +0000 (19:28 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Tue, 27 Feb 2018 19:28:52 +0000 (19:28 +0000)
There is no point in assigning void just to crash on it in the next line

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326234 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Core/RegionStore.cpp

index 604adde9a7f7b5b4d4227ebc2cc20fb6caf7a1aa..686216ae29e21f3c37747f2b820ac4aab3302aec 100644 (file)
@@ -1401,8 +1401,6 @@ SVal RegionStoreManager::getBinding(RegionBindingsConstRef B, Loc L, QualType T)
         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!");