Commit dfe34b6d authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

Clang plugin build fixes after upstream https://reviews.llvm.org/D84362

Bug: 1140409
Change-Id: I4b0c55fa46c877d4f08c5ffca33af899ef20d2a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485222
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818882}
parent e021c075
...@@ -26,9 +26,13 @@ class SuppressibleDiagnosticBuilder : public clang::DiagnosticBuilder { ...@@ -26,9 +26,13 @@ class SuppressibleDiagnosticBuilder : public clang::DiagnosticBuilder {
~SuppressibleDiagnosticBuilder() { ~SuppressibleDiagnosticBuilder() {
if (suppressed_) { if (suppressed_) {
// Clear the counts and underlying data, so the base class destructor // Clear the underlying data, so the base class destructor
// doesn't try to emit the diagnostic. // doesn't try to emit the diagnostic.
// TODO(crbug.com/1140409) Remove in the next Clang roll.
#ifndef LLVM_FORCE_HEAD_REVISION
FlushCounts(); FlushCounts();
#endif
Clear(); Clear();
// Also clear the current diagnostic being processed by the // Also clear the current diagnostic being processed by the
// DiagnosticsEngine, since it won't be emitted. // DiagnosticsEngine, since it won't be emitted.
...@@ -36,6 +40,8 @@ class SuppressibleDiagnosticBuilder : public clang::DiagnosticBuilder { ...@@ -36,6 +40,8 @@ class SuppressibleDiagnosticBuilder : public clang::DiagnosticBuilder {
} }
} }
// TODO(crbug.com/1140409) Remove in the next Clang roll.
#ifndef LLVM_FORCE_HEAD_REVISION
template <typename T> template <typename T>
friend const SuppressibleDiagnosticBuilder& operator<<( friend const SuppressibleDiagnosticBuilder& operator<<(
const SuppressibleDiagnosticBuilder& builder, const SuppressibleDiagnosticBuilder& builder,
...@@ -44,6 +50,7 @@ class SuppressibleDiagnosticBuilder : public clang::DiagnosticBuilder { ...@@ -44,6 +50,7 @@ class SuppressibleDiagnosticBuilder : public clang::DiagnosticBuilder {
base_builder << value; base_builder << value;
return builder; return builder;
} }
#endif
private: private:
clang::DiagnosticsEngine* const diagnostics_; clang::DiagnosticsEngine* const diagnostics_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment