[cfe-commits] r153220 - /cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp

Benjamin Kramer benny.kra at googlemail.com
Wed Mar 21 14:03:48 PDT 2012


Author: d0k
Date: Wed Mar 21 16:03:48 2012
New Revision: 153220

URL: http://llvm.org/viewvc/llvm-project?rev=153220&view=rev
Log:
Remove unused variable, fix indentation.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp?rev=153220&r1=153219&r2=153220&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp Wed Mar 21 16:03:48 2012
@@ -815,14 +815,12 @@
 
     // 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





More information about the cfe-commits mailing list