diff options
author | Christof Douma <Christof.Douma@arm.com> | 2017-06-27 09:50:38 +0000 |
---|---|---|
committer | Christof Douma <Christof.Douma@arm.com> | 2017-06-27 09:50:38 +0000 |
commit | fb4a0450db1a12d9168e72fceb7f6a2827703202 (patch) | |
tree | b411fa0c70bbd75489fa8cd02811c95f8ee1c34d /clang/lib/Frontend/TextDiagnosticPrinter.cpp | |
parent | 35d3c35bea66084540f4ce856f1db36af966d9e6 (diff) | |
download | bcm5719-llvm-fb4a0450db1a12d9168e72fceb7f6a2827703202.tar.gz bcm5719-llvm-fb4a0450db1a12d9168e72fceb7f6a2827703202.zip |
Revert "Revert "[NFC] Refactor DiagnosticRenderer to use FullSourceLoc""
This reverts commit r305688 meaning it reintroduces r305684. To repeat:
[NFC] Refactor DiagnosticRenderer to use FullSourceLoc
Move the DiagnosticRenderer and its dependents to using FullSourceLocs
instead of a SourceLocation and SourceManager pointer. The changeset is
rather large but entirely mechanical.
This is step one to allow DiagnosticRenderer to take either
llvm::SMLocs or clang::SourceLocations.
This breaks clang-tidy and clng-query which will be fixed in a commit
soon after.
Patch by Sanne Wouda
Differential Revision: https://reviews.llvm.org/D31709
llvm-svn: 306384
Diffstat (limited to 'clang/lib/Frontend/TextDiagnosticPrinter.cpp')
-rw-r--r-- | clang/lib/Frontend/TextDiagnosticPrinter.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Frontend/TextDiagnosticPrinter.cpp b/clang/lib/Frontend/TextDiagnosticPrinter.cpp index 17646b48e23..5dd3252d5b1 100644 --- a/clang/lib/Frontend/TextDiagnosticPrinter.cpp +++ b/clang/lib/Frontend/TextDiagnosticPrinter.cpp @@ -150,10 +150,9 @@ void TextDiagnosticPrinter::HandleDiagnostic(DiagnosticsEngine::Level Level, "Unexpected diagnostic with no source manager"); assert(TextDiag && "Unexpected diagnostic outside source file processing"); - TextDiag->emitDiagnostic(Info.getLocation(), Level, DiagMessageStream.str(), - Info.getRanges(), - Info.getFixItHints(), - &Info.getSourceManager()); + TextDiag->emitDiagnostic( + FullSourceLoc(Info.getLocation(), Info.getSourceManager()), Level, + DiagMessageStream.str(), Info.getRanges(), Info.getFixItHints()); OS.flush(); } |