diff options
author | Christof Douma <Christof.Douma@arm.com> | 2017-06-19 12:05:58 +0000 |
---|---|---|
committer | Christof Douma <Christof.Douma@arm.com> | 2017-06-19 12:05:58 +0000 |
commit | 121eb4635e5ad68938f4598befb9eee3dfc73dc9 (patch) | |
tree | 0146d45d3a1574349ab251a4d5f64dc7fdd8d06e /lib/Frontend/TextDiagnosticPrinter.cpp | |
parent | 6ee5ac604b35db8d381cfe8ab1f5883615f20b22 (diff) |
[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.
Patch by Sanne Wouda
Review: https://reviews.llvm.org/D31709
Change-Id: If351a112cdf6718e2d3ef6721b8da9c6376b32dd
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305684 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/TextDiagnosticPrinter.cpp')
-rw-r--r-- | lib/Frontend/TextDiagnosticPrinter.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Frontend/TextDiagnosticPrinter.cpp b/lib/Frontend/TextDiagnosticPrinter.cpp index 17646b48e2..5dd3252d5b 100644 --- a/lib/Frontend/TextDiagnosticPrinter.cpp +++ b/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(); } |