diff options
| author | Manuel Klimek <klimek@google.com> | 2015-04-20 06:58:56 +0000 |
|---|---|---|
| committer | Manuel Klimek <klimek@google.com> | 2015-04-20 06:58:56 +0000 |
| commit | a5e9d49efebec32835f7ad178858b5c77b703b06 (patch) | |
| tree | a012422b924843ebc9c822aedf0c055bbb12fd7b /lib/Tooling/Core/Replacement.cpp | |
| parent | f434397c65aa7cdbcf46ec06c0c1479eca820b3f (diff) | |
| download | clang-a5e9d49efebec32835f7ad178858b5c77b703b06.tar.gz | |
Fix bug in Replacement's toString on Windows (missing flush).
Adapt function to LLVM coding style.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235286 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Tooling/Core/Replacement.cpp')
| -rw-r--r-- | lib/Tooling/Core/Replacement.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Tooling/Core/Replacement.cpp b/lib/Tooling/Core/Replacement.cpp index 525f7dfa91..b9fc92bb6c 100644 --- a/lib/Tooling/Core/Replacement.cpp +++ b/lib/Tooling/Core/Replacement.cpp @@ -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) { |
