From: Benjamin Kramer Date: Wed, 21 Mar 2012 21:03:48 +0000 (+0000) Subject: Remove unused variable, fix indentation. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=850f1b1af015719ec10351bb93530101c265dd29;p=clang Remove unused variable, fix indentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153220 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp index 84366f434b..65a6aacc67 100644 --- a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp @@ -815,14 +815,12 @@ MallocChecker::getAllocationSite(const ExplodedNode *N, SymbolRef Sym, // Find the most recent expression bound to the symbol in the current // context. - ProgramPoint L = N->getLocation(); if (!ReferenceRegion) { - const MemRegion *MR = C.getLocationRegionIfPostStore(N); - if (MR) { - SVal Val = State->getSVal(MR); - if (Val.getAsLocSymbol() == Sym) - ReferenceRegion = MR; - } + if (const MemRegion *MR = C.getLocationRegionIfPostStore(N)) { + SVal Val = State->getSVal(MR); + if (Val.getAsLocSymbol() == Sym) + ReferenceRegion = MR; + } } // Allocation node, is the last node in the current context in which the