summaryrefslogtreecommitdiffstats
path: root/clang/Driver/TextDiagnosticBuffer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-11-30 22:53:43 +0000
committerChris Lattner <sabre@nondot.org>2007-11-30 22:53:43 +0000
commit4431a1b19b7dacd0937921f0eac8c9ff382387e0 (patch)
treeb374dce8fd1f9b888b509776d8f9e419d0d41000 /clang/Driver/TextDiagnosticBuffer.cpp
parent7a9a38abe026a976a34507698735532a36f0cd44 (diff)
downloadbcm5719-llvm-4431a1b19b7dacd0937921f0eac8c9ff382387e0.tar.gz
bcm5719-llvm-4431a1b19b7dacd0937921f0eac8c9ff382387e0.zip
start partitioning the diagnostics into two classes: those
that are builtin and those that are aren't. This is a bunch of API refactoring that will make this possible, but there is no functionality change yet. llvm-svn: 44473
Diffstat (limited to 'clang/Driver/TextDiagnosticBuffer.cpp')
-rw-r--r--clang/Driver/TextDiagnosticBuffer.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/Driver/TextDiagnosticBuffer.cpp b/clang/Driver/TextDiagnosticBuffer.cpp
index 1f6075ea921..d0e2f900c55 100644
--- a/clang/Driver/TextDiagnosticBuffer.cpp
+++ b/clang/Driver/TextDiagnosticBuffer.cpp
@@ -17,7 +17,8 @@ using namespace clang;
/// HandleDiagnostic - Store the errors & warnings that are reported.
///
-void TextDiagnosticBuffer::HandleDiagnostic(Diagnostic::Level Level,
+void TextDiagnosticBuffer::HandleDiagnostic(Diagnostic &Diags,
+ Diagnostic::Level Level,
SourceLocation Pos,
diag::kind ID,
const std::string *Strs,
@@ -27,12 +28,12 @@ void TextDiagnosticBuffer::HandleDiagnostic(Diagnostic::Level Level,
switch (Level) {
default: assert(0 && "Diagnostic not handled during diagnostic buffering!");
case Diagnostic::Warning:
- Warnings.push_back(std::make_pair(Pos, FormatDiagnostic(Level, ID, Strs,
- NumStrs)));
+ Warnings.push_back(std::make_pair(Pos, FormatDiagnostic(Diags, Level, ID,
+ Strs, NumStrs)));
break;
case Diagnostic::Error:
- Errors.push_back(std::make_pair(Pos, FormatDiagnostic(Level, ID, Strs,
- NumStrs)));
+ Errors.push_back(std::make_pair(Pos, FormatDiagnostic(Diags, Level, ID,
+ Strs, NumStrs)));
break;
}
}
OpenPOWER on IntegriCloud