diff options
| author | Alp Toker <alp@nuanti.com> | 2013-12-23 07:47:48 +0000 |
|---|---|---|
| committer | Alp Toker <alp@nuanti.com> | 2013-12-23 07:47:48 +0000 |
| commit | a8b02c2e46f50c3fe67adce23ce646b7fe40eeff (patch) | |
| tree | 6ee3dde0be5a86ae611e4eed221ee25ba2191cbf /clang/lib/Frontend | |
| parent | 6f69c73db18a01c06393bb08eb65eb2a5113c782 (diff) | |
| download | bcm5719-llvm-a8b02c2e46f50c3fe67adce23ce646b7fe40eeff.tar.gz bcm5719-llvm-a8b02c2e46f50c3fe67adce23ce646b7fe40eeff.zip | |
TextDiagnosticBuffer: Fix copy-paste mistake in r197856
The TextDiagnosticBuffer is meant to scrub SourceLocations as the input/output
SourceManagers may be different.
To be safe this commit restores the original behaviour though in practice
all current users seem to share a single SM.
Would be nice to replace TextDiagnosticBuffer now that more capable interfaces
like CaptureDiagnosticConsumer / StoredDiagnosticConsumer exist.
llvm-svn: 197902
Diffstat (limited to 'clang/lib/Frontend')
| -rw-r--r-- | clang/lib/Frontend/TextDiagnosticBuffer.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/lib/Frontend/TextDiagnosticBuffer.cpp b/clang/lib/Frontend/TextDiagnosticBuffer.cpp index 31fb665cbc1..b1c793a9709 100644 --- a/clang/lib/Frontend/TextDiagnosticBuffer.cpp +++ b/clang/lib/Frontend/TextDiagnosticBuffer.cpp @@ -45,16 +45,13 @@ void TextDiagnosticBuffer::HandleDiagnostic(DiagnosticsEngine::Level Level, void TextDiagnosticBuffer::FlushDiagnostics(DiagnosticsEngine &Diags) const { // FIXME: Flush the diagnostics in order. for (const_iterator it = err_begin(), ie = err_end(); it != ie; ++it) - Diags.Report(it->first, - Diags.getCustomDiagID(DiagnosticsEngine::Error, "%0")) + Diags.Report(Diags.getCustomDiagID(DiagnosticsEngine::Error, "%0")) << it->second; for (const_iterator it = warn_begin(), ie = warn_end(); it != ie; ++it) - Diags.Report(it->first, - Diags.getCustomDiagID(DiagnosticsEngine::Warning, "%0")) + Diags.Report(Diags.getCustomDiagID(DiagnosticsEngine::Warning, "%0")) << it->second; for (const_iterator it = note_begin(), ie = note_end(); it != ie; ++it) - Diags.Report(it->first, - Diags.getCustomDiagID(DiagnosticsEngine::Note, "%0")) + Diags.Report(Diags.getCustomDiagID(DiagnosticsEngine::Note, "%0")) << it->second; } |

