[cfe-commits] r129856 - /cfe/trunk/lib/Rewrite/Rewriter.cpp
Fariborz Jahanian
fjahanian at apple.com
Wed Apr 20 09:38:37 PDT 2011
Author: fjahanian
Date: Wed Apr 20 11:38:37 2011
New Revision: 129856
URL: http://llvm.org/viewvc/llvm-project?rev=129856&view=rev
Log:
Use S.str() to force a flush.
Modified:
cfe/trunk/lib/Rewrite/Rewriter.cpp
Modified: cfe/trunk/lib/Rewrite/Rewriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/Rewriter.cpp?rev=129856&r1=129855&r2=129856&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/Rewriter.cpp (original)
+++ cfe/trunk/lib/Rewrite/Rewriter.cpp Wed Apr 20 11:38:37 2011
@@ -300,7 +300,6 @@
std::string SStr;
llvm::raw_string_ostream S(SStr);
To->printPretty(S, 0, PrintingPolicy(*LangOpts));
- S.flush();
const std::string &Str = S.str();
ReplaceText(From->getLocStart(), Size, Str);
@@ -311,8 +310,7 @@
std::string SStr;
llvm::raw_string_ostream S(SStr);
From->printPretty(S, 0, PrintingPolicy(*LangOpts));
- S.flush();
- return SStr;
+ return S.str();
}
bool Rewriter::IncreaseIndentation(CharSourceRange range,
More information about the cfe-commits
mailing list