r235286 - Fix bug in Replacement's toString on Windows (missing flush).
Manuel Klimek
klimek at google.com
Sun Apr 19 23:58:57 PDT 2015
Author: klimek
Date: Mon Apr 20 01:58:56 2015
New Revision: 235286
URL: http://llvm.org/viewvc/llvm-project?rev=235286&view=rev
Log:
Fix bug in Replacement's toString on Windows (missing flush).
Adapt function to LLVM coding style.
Modified:
cfe/trunk/lib/Tooling/Core/Replacement.cpp
Modified: cfe/trunk/lib/Tooling/Core/Replacement.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Core/Replacement.cpp?rev=235286&r1=235285&r2=235286&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/Core/Replacement.cpp (original)
+++ cfe/trunk/lib/Tooling/Core/Replacement.cpp Mon Apr 20 01:58:56 2015
@@ -77,11 +77,11 @@ bool Replacement::apply(Rewriter &Rewrit
}
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) {
More information about the cfe-commits
mailing list