aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-08-07 17:49:57 +0000
committerTed Kremenek <kremenek@apple.com>2008-08-07 17:49:57 +0000
commitb4398aa27da4d6919c3ae448d1ae66ba6cafc048 (patch)
tree6f34a5c54a19240c6517e50fd6d51524ce7009fe /lib/Basic
parent45e52e137702abbfa44852979a5717dfdc09c9bc (diff)
Fix --html-diags in driver by delaying the construction of an HTMLDiagnosticClient until after we have created the Preprocessor object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54472 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic')
-rw-r--r--lib/Basic/Diagnostic.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp
index 35d665d1a5..16bdd4a6c2 100644
--- a/lib/Basic/Diagnostic.cpp
+++ b/lib/Basic/Diagnostic.cpp
@@ -108,7 +108,7 @@ namespace clang {
// Common Diagnostic implementation
//===----------------------------------------------------------------------===//
-Diagnostic::Diagnostic(DiagnosticClient &client) : Client(client) {
+Diagnostic::Diagnostic(DiagnosticClient *client) : Client(client) {
IgnoreAllWarnings = false;
WarningsAsErrors = false;
WarnOnExtensions = false;
@@ -219,7 +219,7 @@ void Diagnostic::Report(DiagnosticClient* C,
return;
// Set the diagnostic client if it isn't set already.
- if (!C) C = &Client;
+ if (!C) C = Client;
// If this is not an error and we are in a system header, ignore it. We have
// to check on the original class here, because we also want to ignore
@@ -227,13 +227,13 @@ void Diagnostic::Report(DiagnosticClient* C,
// warnings/extensions to errors.
if (DiagID < diag::NUM_BUILTIN_DIAGNOSTICS &&
getBuiltinDiagClass(DiagID) != ERROR &&
- Client.isInSystemHeader(Pos))
+ Client->isInSystemHeader(Pos))
return;
if (DiagLevel >= Diagnostic::Error) {
ErrorOccurred = true;
- if (C == &Client)
+ if (C == Client)
++NumErrors;
}
@@ -242,7 +242,7 @@ void Diagnostic::Report(DiagnosticClient* C,
C->HandleDiagnostic(*this, DiagLevel, Pos, (diag::kind)DiagID,
Strs, NumStrs, Ranges, NumRanges);
- if (C == &Client)
+ if (C == Client)
++NumDiagnostics;
}