]> granicus.if.org Git - clang/commitdiff
Remove unused variable, fix indentation.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 21 Mar 2012 21:03:48 +0000 (21:03 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 21 Mar 2012 21:03:48 +0000 (21:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153220 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Checkers/MallocChecker.cpp

index 84366f434b994f75883dd411858d90e97a8cd7fd..65a6aacc67e1a1a1c34fbeccccfabca5f44bd017 100644 (file)
@@ -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