From: George Karpenkov Date: Tue, 27 Feb 2018 19:28:52 +0000 (+0000) Subject: [analyzer] Remove redundant check X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bd1add2fd57c63df2cb3c890d65a9709f8337160;p=clang [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326234 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Core/RegionStore.cpp b/lib/StaticAnalyzer/Core/RegionStore.cpp index 604adde9a7..686216ae29 100644 --- a/lib/StaticAnalyzer/Core/RegionStore.cpp +++ b/lib/StaticAnalyzer/Core/RegionStore.cpp @@ -1401,8 +1401,6 @@ SVal RegionStoreManager::getBinding(RegionBindingsConstRef B, Loc L, QualType T) T = TR->getLocationType()->getPointeeType(); else if (const SymbolicRegion *SR = dyn_cast(MR)) T = SR->getSymbol()->getType()->getPointeeType(); - else if (isa(MR)) - T = Ctx.VoidTy; } assert(!T.isNull() && "Unable to auto-detect binding type!"); assert(!T->isVoidType() && "Attempting to dereference a void pointer!");