summaryrefslogtreecommitdiffstats
path: root/lib/Frontend/TextDiagnosticBuffer.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2014-05-01 14:06:01 +0000
committerTobias Grosser <tobias@grosser.es>2014-05-01 14:06:01 +0000
commit0d40b638c5261b43c99d36f8045757fb494d9871 (patch)
treebca3e3aa479acacc0325cdb462818813eaa2d3f5 /lib/Frontend/TextDiagnosticBuffer.cpp
parent9de1702d31ae13c59ba9427343ec867fe7da3427 (diff)
Support 'remark' in VerifyDiagnosticConsumer
After Diego added support for -Rpass=inliner we have now in-tree remarks which we can use to properly test this feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/TextDiagnosticBuffer.cpp')
-rw-r--r--lib/Frontend/TextDiagnosticBuffer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Frontend/TextDiagnosticBuffer.cpp b/lib/Frontend/TextDiagnosticBuffer.cpp
index b1c793a970..9c6bebb072 100644
--- a/lib/Frontend/TextDiagnosticBuffer.cpp
+++ b/lib/Frontend/TextDiagnosticBuffer.cpp
@@ -35,6 +35,9 @@ void TextDiagnosticBuffer::HandleDiagnostic(DiagnosticsEngine::Level Level,
case DiagnosticsEngine::Warning:
Warnings.push_back(std::make_pair(Info.getLocation(), Buf.str()));
break;
+ case DiagnosticsEngine::Remark:
+ Remarks.push_back(std::make_pair(Info.getLocation(), Buf.str()));
+ break;
case DiagnosticsEngine::Error:
case DiagnosticsEngine::Fatal:
Errors.push_back(std::make_pair(Info.getLocation(), Buf.str()));
@@ -50,6 +53,9 @@ void TextDiagnosticBuffer::FlushDiagnostics(DiagnosticsEngine &Diags) const {
for (const_iterator it = warn_begin(), ie = warn_end(); it != ie; ++it)
Diags.Report(Diags.getCustomDiagID(DiagnosticsEngine::Warning, "%0"))
<< it->second;
+ for (const_iterator it = remark_begin(), ie = remark_end(); it != ie; ++it)
+ Diags.Report(Diags.getCustomDiagID(DiagnosticsEngine::Remark, "%0"))
+ << it->second;
for (const_iterator it = note_begin(), ie = note_end(); it != ie; ++it)
Diags.Report(Diags.getCustomDiagID(DiagnosticsEngine::Note, "%0"))
<< it->second;