DiagnosticsEngine::Level Level,
ArrayRef<CharSourceRange> Ranges,
const SourceManager &SM) = 0;
-
- virtual void emitBasicNote(StringRef Message) = 0;
-
+
virtual void emitCodeContext(SourceLocation Loc,
DiagnosticsEngine::Level Level,
SmallVectorImpl<CharSourceRange>& Ranges,
private:
+ void emitBasicNote(StringRef Message);
void emitIncludeStack(SourceLocation Loc, PresumedLoc PLoc,
DiagnosticsEngine::Level Level, const SourceManager &SM);
void emitIncludeStackRecursively(SourceLocation Loc, const SourceManager &SM);
virtual ~DiagnosticNoteRenderer();
- void emitBasicNote(StringRef Message) override;
-
void emitIncludeLocation(SourceLocation Loc, PresumedLoc PLoc,
const SourceManager &SM) override;
emitSnippetAndCaret(Loc, Level, Ranges, Hints, SM);
}
- void emitBasicNote(StringRef Message) override;
-
void emitIncludeLocation(SourceLocation Loc, PresumedLoc PLoc,
const SourceManager &SM) override;
&Diag);
}
+void DiagnosticRenderer::emitBasicNote(StringRef Message) {
+ emitDiagnosticMessage(
+ SourceLocation(), PresumedLoc(), DiagnosticsEngine::Note, Message,
+ ArrayRef<CharSourceRange>(), nullptr, DiagOrStoredDiag());
+}
+
/// \brief Prints an include stack when appropriate for a particular
/// diagnostic level and location.
///
Message << "while building module '" << ModuleName << ":";
emitNote(Loc, Message.str(), &SM);
}
-
-
-void DiagnosticNoteRenderer::emitBasicNote(StringRef Message) {
- emitNote(SourceLocation(), Message, nullptr);
-}
OS << ' ';
}
-void TextDiagnostic::emitBasicNote(StringRef Message) {
- // FIXME: Emit this as a real note diagnostic.
- // FIXME: Format an actual diagnostic rather than a hard coded string.
- OS << "note: " << Message << "\n";
-}
-
void TextDiagnostic::emitIncludeLocation(SourceLocation Loc,
PresumedLoc PLoc,
const SourceManager &SM) {