diff options
Diffstat (limited to 'clang/lib/Frontend')
| -rw-r--r-- | clang/lib/Frontend/DiagnosticRenderer.cpp | 11 | ||||
| -rw-r--r-- | clang/lib/Frontend/TextDiagnostic.cpp | 6 |
2 files changed, 6 insertions, 11 deletions
diff --git a/clang/lib/Frontend/DiagnosticRenderer.cpp b/clang/lib/Frontend/DiagnosticRenderer.cpp index ce9fc0548c1..cff32b852bf 100644 --- a/clang/lib/Frontend/DiagnosticRenderer.cpp +++ b/clang/lib/Frontend/DiagnosticRenderer.cpp @@ -190,6 +190,12 @@ void DiagnosticRenderer::emitStoredDiagnostic(StoredDiagnostic &Diag) { &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. /// @@ -506,8 +512,3 @@ DiagnosticNoteRenderer::emitBuildingModuleLocation(SourceLocation Loc, Message << "while building module '" << ModuleName << ":"; emitNote(Loc, Message.str(), &SM); } - - -void DiagnosticNoteRenderer::emitBasicNote(StringRef Message) { - emitNote(SourceLocation(), Message, nullptr); -} diff --git a/clang/lib/Frontend/TextDiagnostic.cpp b/clang/lib/Frontend/TextDiagnostic.cpp index 840c280b518..847acf114e1 100644 --- a/clang/lib/Frontend/TextDiagnostic.cpp +++ b/clang/lib/Frontend/TextDiagnostic.cpp @@ -870,12 +870,6 @@ void TextDiagnostic::emitDiagnosticLoc(SourceLocation Loc, PresumedLoc PLoc, 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) { |

