From c25c5e0ba23461a5d15e6eb77129fa750d28209a Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 21 Mar 2012 21:03:48 +0000 Subject: [PATCH] Remove unused variable, fix indentation. llvm-svn: 153220 --- clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp index 84366f434b99..65a6aacc67e1 100644 --- a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp +++ b/clang/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