class ForwardingDiagnosticConsumer

Declaration

class ForwardingDiagnosticConsumer : public DiagnosticConsumer { /* full declaration omitted */ };

Description

Diagnostic consumer that forwards diagnostics along to an existing, already-initialized diagnostic consumer.

Declared at: clang/include/clang/Basic/Diagnostic.h:1806

Inherits from: DiagnosticConsumer

Member Variables

private clang::DiagnosticConsumer& Target

Inherited from DiagnosticConsumer:

protected NumWarnings = 0
protected NumErrors = 0

Method Overview

Inherited from DiagnosticConsumer:

Methods

ForwardingDiagnosticConsumer(
    clang::DiagnosticConsumer& Target)

Declared at: clang/include/clang/Basic/Diagnostic.h:1810

Parameters

clang::DiagnosticConsumer& Target

void HandleDiagnostic(
    DiagnosticsEngine::Level DiagLevel,
    const clang::Diagnostic& Info)

Description

Handle this diagnostic, reporting it to the user or capturing it to a log as needed. The default implementation just keeps track of the total number of warnings and errors.

Declared at: clang/include/clang/Basic/Diagnostic.h:1813

Parameters

DiagnosticsEngine::Level DiagLevel
const clang::Diagnostic& Info

bool IncludeInDiagnosticCounts() const

Description

Indicates whether the diagnostics handled by this DiagnosticConsumer should be included in the number of diagnostics reported by DiagnosticsEngine. The default implementation returns true.

Declared at: clang/include/clang/Basic/Diagnostic.h:1817

void clear()

Declared at: clang/include/clang/Basic/Diagnostic.h:1815

~ForwardingDiagnosticConsumer()

Declared at: clang/include/clang/Basic/Diagnostic.h:1811