Fix bug in Replacement's toString on Windows (missing flush).
authorManuel Klimek <klimek@google.com>
Mon, 20 Apr 2015 06:58:56 +0000 (06:58 +0000)
committerManuel Klimek <klimek@google.com>
Mon, 20 Apr 2015 06:58:56 +0000 (06:58 +0000)
Adapt function to LLVM coding style.

llvm-svn: 235286

clang/lib/Tooling/Core/Replacement.cpp

index 525f7df..b9fc92b 100644 (file)
@@ -77,11 +77,11 @@ bool Replacement::apply(Rewriter &Rewrite) const {
 }
 
 std::string Replacement::toString() const {
-  std::string result;
-  llvm::raw_string_ostream stream(result);
-  stream << FilePath << ": " << ReplacementRange.getOffset() << ":+"
+  std::string Result;
+  llvm::raw_string_ostream Stream(Result);
+  Stream << FilePath << ": " << ReplacementRange.getOffset() << ":+"
          << ReplacementRange.getLength() << ":\"" << ReplacementText << "\"";
-  return result;
+  return Stream.str();
 }
 
 bool operator<(const Replacement &LHS, const Replacement &RHS) {