]> granicus.if.org Git - clang/commitdiff
Code cleanup: remove explicit flush() in favor of using the ostream's str()
authorJordy Rose <jediknil@belkadan.com>
Tue, 8 Jun 2010 22:59:01 +0000 (22:59 +0000)
committerJordy Rose <jediknil@belkadan.com>
Tue, 8 Jun 2010 22:59:01 +0000 (22:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105657 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Checker/MallocChecker.cpp

index 30c4f172d0e9ff885efcbf8ce196717fcd78de38..95f70e0925a83be898f04510a235be63b4ff3d73 100644 (file)
@@ -398,8 +398,7 @@ void MallocChecker::ReportBadFree(CheckerContext &C, SVal ArgVal,
         os << "not memory allocated by malloc()";
     }
     
-    os.flush();
-    EnhancedBugReport *R = new EnhancedBugReport(*BT_BadFree, buf.str(), N);
+    EnhancedBugReport *R = new EnhancedBugReport(*BT_BadFree, os.str(), N);
     R->addRange(range);
     C.EmitReport(R);
   }