class DiagnosticsEngine::DiagState

Declaration

class DiagnosticsEngine::DiagState { /* full declaration omitted */ };

Description

Mapping information for diagnostics. Mapping info is packed into four bits per diagnostic. The low three bits are the mapping (an instance of diag::Severity), or zero if unset. The high bit is set when the mapping was established as a user mapping. If the high bit is clear, then the low bits are set to the default value, and should be mapped with -pedantic, -Werror, etc. A new DiagState is created and kept around when diagnostic pragmas modify the state so that we know what is the diagnostic state at any given source location.

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

Member Variables

private llvm::DenseMap<unsigned int, DiagnosticMapping> DiagMap
public unsigned int IgnoreAllWarnings
public unsigned int EnableAllWarnings
public unsigned int WarningsAsErrors
public unsigned int ErrorsAsFatal
public unsigned int SuppressSystemWarnings
public diag::Severity ExtBehavior = diag::Severity::Ignored

Method Overview

  • public DiagState()
  • public clang::DiagnosticsEngine::DiagState::const_iterator begin() const
  • public clang::DiagnosticsEngine::DiagState::const_iterator end() const
  • public clang::DiagnosticMapping & getOrAddMapping(diag::kind Diag)
  • public clang::DiagnosticMapping lookupMapping(diag::kind Diag) const
  • public void setMapping(diag::kind Diag, clang::DiagnosticMapping Info)

Methods

DiagState()

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

clang::DiagnosticsEngine::DiagState::
    const_iterator
    begin() const

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

clang::DiagnosticsEngine::DiagState::
    const_iterator
    end() const

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

clang::DiagnosticMapping& getOrAddMapping(
    diag::kind Diag)

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

Parameters

diag::kind Diag

clang::DiagnosticMapping lookupMapping(
    diag::kind Diag) const

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

Parameters

diag::kind Diag

void setMapping(diag::kind Diag,
                clang::DiagnosticMapping Info)

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

Parameters

diag::kind Diag
clang::DiagnosticMapping Info