summaryrefslogtreecommitdiffstats
path: root/lib/Frontend/SerializedDiagnosticPrinter.cpp
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2015-03-18 10:17:07 +0000
committerYaron Keren <yaron.keren@gmail.com>2015-03-18 10:17:07 +0000
commit9bd91b686a3790e0b5074e648f65848fe4fd33c2 (patch)
treeb49e0475e9551d4418d4e35010a4bcddfd9162dc /lib/Frontend/SerializedDiagnosticPrinter.cpp
parentd9d7196743cf769d262f45f2fe7e4a3b6e686592 (diff)
Remove many superfluous SmallString::str() calls.
Now that SmallString is a first-class citizen, most SmallString::str() calls are not required. This patch removes a whole bunch of them, yet there are lots more. There are two use cases where str() is really needed: 1) To use one of StringRef member functions which is not available in SmallString. 2) To convert to std::string, as StringRef implicitly converts while SmallString do not. We may wish to change this, but it may introduce ambiguity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232622 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/SerializedDiagnosticPrinter.cpp')
-rw-r--r--lib/Frontend/SerializedDiagnosticPrinter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Frontend/SerializedDiagnosticPrinter.cpp b/lib/Frontend/SerializedDiagnosticPrinter.cpp
index ec9c0a93b1..5dcacfadf2 100644
--- a/lib/Frontend/SerializedDiagnosticPrinter.cpp
+++ b/lib/Frontend/SerializedDiagnosticPrinter.cpp
@@ -632,7 +632,7 @@ void SDiagsWriter::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
"Unexpected diagnostic with valid location outside of a source file");
SDiagsRenderer Renderer(*this, *LangOpts, &*State->DiagOpts);
Renderer.emitDiagnostic(Info.getLocation(), DiagLevel,
- State->diagBuf.str(),
+ State->diagBuf,
Info.getRanges(),
Info.getFixItHints(),
&Info.getSourceManager(),