summaryrefslogtreecommitdiff
path: root/tools/libclang/CIndexDiagnostic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libclang/CIndexDiagnostic.cpp')
-rw-r--r--tools/libclang/CIndexDiagnostic.cpp30
1 files changed, 12 insertions, 18 deletions
diff --git a/tools/libclang/CIndexDiagnostic.cpp b/tools/libclang/CIndexDiagnostic.cpp
index de223d3043a31..4e47b25a4bf01 100644
--- a/tools/libclang/CIndexDiagnostic.cpp
+++ b/tools/libclang/CIndexDiagnostic.cpp
@@ -110,40 +110,34 @@ public:
CurrentSet = &CD.getChildDiagnostics();
}
- void emitDiagnosticMessage(SourceLocation Loc, PresumedLoc PLoc,
- DiagnosticsEngine::Level Level,
- StringRef Message,
+ void emitDiagnosticMessage(FullSourceLoc Loc, PresumedLoc PLoc,
+ DiagnosticsEngine::Level Level, StringRef Message,
ArrayRef<CharSourceRange> Ranges,
- const SourceManager *SM,
DiagOrStoredDiag D) override {
if (!D.isNull())
return;
CXSourceLocation L;
- if (SM)
- L = translateSourceLocation(*SM, LangOpts, Loc);
+ if (Loc.hasManager())
+ L = translateSourceLocation(Loc.getManager(), LangOpts, Loc);
else
L = clang_getNullLocation();
CurrentSet->appendDiagnostic(
llvm::make_unique<CXDiagnosticCustomNoteImpl>(Message, L));
}
- void emitDiagnosticLoc(SourceLocation Loc, PresumedLoc PLoc,
+ void emitDiagnosticLoc(FullSourceLoc Loc, PresumedLoc PLoc,
DiagnosticsEngine::Level Level,
- ArrayRef<CharSourceRange> Ranges,
- const SourceManager &SM) override {}
+ ArrayRef<CharSourceRange> Ranges) override {}
- void emitCodeContext(SourceLocation Loc,
- DiagnosticsEngine::Level Level,
- SmallVectorImpl<CharSourceRange>& Ranges,
- ArrayRef<FixItHint> Hints,
- const SourceManager &SM) override {}
+ void emitCodeContext(FullSourceLoc Loc, DiagnosticsEngine::Level Level,
+ SmallVectorImpl<CharSourceRange> &Ranges,
+ ArrayRef<FixItHint> Hints) override {}
- void emitNote(SourceLocation Loc, StringRef Message,
- const SourceManager *SM) override {
+ void emitNote(FullSourceLoc Loc, StringRef Message) override {
CXSourceLocation L;
- if (SM)
- L = translateSourceLocation(*SM, LangOpts, Loc);
+ if (Loc.hasManager())
+ L = translateSourceLocation(Loc.getManager(), LangOpts, Loc);
else
L = clang_getNullLocation();
CurrentSet->appendDiagnostic(