clang-tools 6.0.0

Public Member Functions | List of all members
clang::tidy::ClangTidyDiagnosticConsumer Class Reference

A diagnostic consumer that turns each `Diagnostic` into a `SourceManager-independent` `ClangTidyError`. More...

`#include <ClangTidyDiagnosticConsumer.h>`

Inheritance diagram for clang::tidy::ClangTidyDiagnosticConsumer:
[legend]
Collaboration diagram for clang::tidy::ClangTidyDiagnosticConsumer:
[legend]

## Public Member Functions
| ClangTidyDiagnosticConsumer (ClangTidyContext &Ctx, bool RemoveIncompatibleErrors=true)
void | HandleDiagnostic (DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) override
void | finish () override
| Flushes the internal diagnostics buffer to the ClangTidyContext. More...

## Detailed Description

A diagnostic consumer that turns each `Diagnostic` into a `SourceManager-independent` `ClangTidyError`.

Definition at line 227 of file ClangTidyDiagnosticConsumer.h.

## Constructor & Destructor Documentation

## ◆ ClangTidyDiagnosticConsumer()

ClangTidyDiagnosticConsumer::ClangTidyDiagnosticConsumer | ( | ClangTidyContext & | Ctx,
|  | bool | RemoveIncompatibleErrors = `true`
| ) |  |

Definition at line 261 of file ClangTidyDiagnosticConsumer.cpp.

## Member Function Documentation

## ◆ finish()

void ClangTidyDiagnosticConsumer::finish | ( |  | ) |
| override

Flushes the internal diagnostics buffer to the ClangTidyContext.

Definition at line 663 of file ClangTidyDiagnosticConsumer.cpp.

## ◆ HandleDiagnostic()

void ClangTidyDiagnosticConsumer::HandleDiagnostic | ( | DiagnosticsEngine::Level | DiagLevel,
|  | const Diagnostic & | Info
| ) |  |
| override

Definition at line 382 of file ClangTidyDiagnosticConsumer.cpp.

References clang::tidy::ClangTidyStats::ErrorsIgnoredNOLINT, File, Fix(), clang::tidy::ClangTidyContext::getCheckName(), clang::tidy::ClangTidyContext::getCurrentBuildDirectory(), clang::tidy::ClangTidyContext::getGlobalOptions(), clang::tidy::ClangTidyContext::getLangOpts(), clang::tidy::ClangTidyContext::getOptions(), clang::tidy::ClangTidyOptions::HeaderFilterRegex, clang::tidy::ClangTidyGlobalOptions::LineFilter, LineIsMarkedWithNOLINTinMacro(), clang::tidy::modernize::Message, clang::tidy::ClangTidyOptions::SystemHeaders, and clang::tidy::ClangTidyContext::treatAsError().

The documentation for this class was generated from the following files:

- ClangTidyDiagnosticConsumer.h
- ClangTidyDiagnosticConsumer.cpp