[cfe-commits] r110473 - /cfe/trunk/lib/Checker/MallocChecker.cpp

Ted Kremenek kremenek at apple.com
Fri Aug 6 14:12:55 PDT 2010


Author: kremenek
Date: Fri Aug  6 16:12:55 2010
New Revision: 110473

URL: http://llvm.org/viewvc/llvm-project?rev=110473&view=rev
Log:
Fix 80 col. violations.

Modified:
    cfe/trunk/lib/Checker/MallocChecker.cpp

Modified: cfe/trunk/lib/Checker/MallocChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/MallocChecker.cpp?rev=110473&r1=110472&r2=110473&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/MallocChecker.cpp (original)
+++ cfe/trunk/lib/Checker/MallocChecker.cpp Fri Aug  6 16:12:55 2010
@@ -24,7 +24,8 @@
 namespace {
 
 class RefState {
-  enum Kind { AllocateUnchecked, AllocateFailed, Released, Escaped, Relinquished } K;
+  enum Kind { AllocateUnchecked, AllocateFailed, Released, Escaped,
+              Relinquished } K;
   const Stmt *S;
 
 public:
@@ -48,7 +49,9 @@
   }
   static RefState getReleased(const Stmt *s) { return RefState(Released, s); }
   static RefState getEscaped(const Stmt *s) { return RefState(Escaped, s); }
-  static RefState getRelinquished(const Stmt *s) { return RefState(Relinquished, s); }
+  static RefState getRelinquished(const Stmt *s) {
+    return RefState(Relinquished, s);
+  }
 
   void Profile(llvm::FoldingSetNodeID &ID) const {
     ID.AddInteger(K);
@@ -68,7 +71,8 @@
 
 public:
   MallocChecker() 
-    : BT_DoubleFree(0), BT_Leak(0), BT_UseFree(0), BT_UseRelinquished(0), BT_BadFree(0),
+    : BT_DoubleFree(0), BT_Leak(0), BT_UseFree(0), BT_UseRelinquished(0),
+      BT_BadFree(0),
       II_malloc(0), II_free(0), II_realloc(0), II_calloc(0) {}
   static void *getTag();
   bool EvalCallExpr(CheckerContext &C, const CallExpr *CE);
@@ -84,7 +88,8 @@
 
 private:
   void MallocMem(CheckerContext &C, const CallExpr *CE);
-  void MallocMemReturnsAttr(CheckerContext &C, const CallExpr *CE, const OwnershipAttr* Att);
+  void MallocMemReturnsAttr(CheckerContext &C, const CallExpr *CE,
+                            const OwnershipAttr* Att);
   const GRState *MallocMemAux(CheckerContext &C, const CallExpr *CE,
                               const Expr *SizeEx, SVal Init,
                               const GRState *state) {
@@ -706,11 +711,14 @@
             break;
 
           // If the state can't represent this binding, we still own it.
-          if (notNullState == (notNullState->bindLoc(cast<Loc>(location), UnknownVal())))
+          if (notNullState == (notNullState->bindLoc(cast<Loc>(location),
+                                                     UnknownVal())))
             break;
 
           // We no longer own this pointer.
-          notNullState = notNullState->set<RegionState>(Sym, RefState::getRelinquished(StoreE));
+          notNullState =
+            notNullState->set<RegionState>(Sym,
+                                           RefState::getRelinquished(StoreE));
         }
         while (false);
       }





More information about the cfe-commits mailing list