class ClangDiagnosticHandler

Declaration

class ClangDiagnosticHandler : public DiagnosticHandler { /* full declaration omitted */ };

Description

This is the base class for diagnostic handling in LLVM. The handleDiagnostics method must be overriden by the subclasses to handle diagnostic. The *RemarkEnabled methods can be overriden to control which remarks are enabled.

Declared at: clang/lib/CodeGen/CodeGenAction.cpp:59

Inherits from: DiagnosticHandler

Member Variables

private const clang::CodeGenOptions& CodeGenOpts
private clang::BackendConsumer* BackendCon

Inherited from DiagnosticHandler:

public DiagnosticContext = nullptr
public DiagHandlerCallback = nullptr

Method Overview

Inherited from DiagnosticHandler:

Methods

ClangDiagnosticHandler(
    const clang::CodeGenOptions& CGOpts,
    clang::BackendConsumer* BCon)

Declared at: clang/lib/CodeGen/CodeGenAction.cpp:61

Parameters

const clang::CodeGenOptions& CGOpts
clang::BackendConsumer* BCon

bool handleDiagnostics(
    const llvm::DiagnosticInfo& DI)

Description

Override handleDiagnostics to provide custom implementation. Return true if it handles diagnostics reporting properly otherwise return false to make LLVMContext::diagnose() to print the message with a prefix based on the severity.

Declared at: clang/lib/CodeGen/CodeGenAction.cpp:64

Parameters

const llvm::DiagnosticInfo& DI

bool isAnalysisRemarkEnabled(
    llvm::StringRef PassName) const

Description

Return true if analysis remarks are enabled, override to provide different implementation.

Declared at: clang/lib/CodeGen/CodeGenAction.cpp:66

Parameters

llvm::StringRef PassName

bool isAnyRemarkEnabled() const

Description

Return true if any type of remarks are enabled for any pass.

Declared at: clang/lib/CodeGen/CodeGenAction.cpp:76

bool isMissedOptRemarkEnabled(
    llvm::StringRef PassName) const

Description

Return true if missed optimization remarks are enabled, override to provide different implementation.

Declared at: clang/lib/CodeGen/CodeGenAction.cpp:69

Parameters

llvm::StringRef PassName

bool isPassedOptRemarkEnabled(
    llvm::StringRef PassName) const

Description

Return true if passed optimization remarks are enabled, override to provide different implementation.

Declared at: clang/lib/CodeGen/CodeGenAction.cpp:72

Parameters

llvm::StringRef PassName