clang-tools 8.0.0

Public Member Functions | List of all members
clang::clangd::StoreDiags Class Reference

StoreDiags collects the diagnostics that can later be reported by clangd. More...

`#include <Diagnostics.h>`

Inheritance diagram for clang::clangd::StoreDiags:
[legend]
Collaboration diagram for clang::clangd::StoreDiags:
[legend]

## Public Member Functions
std::vector< Diag > | take ()
void | BeginSourceFile (const LangOptions &Opts, const Preprocessor *) override
void | EndSourceFile () override
void | HandleDiagnostic (DiagnosticsEngine::Level DiagLevel, const clang::Diagnostic &Info) override

## Detailed Description

StoreDiags collects the diagnostics that can later be reported by clangd.

It groups all notes for a diagnostic into a single Diag and filters out diagnostics that don't mention the main file (i.e. neither the diag itself nor its notes are in the main file).

Definition at line 94 of file Diagnostics.h.

## Member Function Documentation

## ◆ BeginSourceFile()

void clang::clangd::StoreDiags::BeginSourceFile | ( | const LangOptions & | Opts,
|  | const Preprocessor * |
| ) |  |
| override

Definition at line 294 of file Diagnostics.cpp.

## ◆ EndSourceFile()

void clang::clangd::StoreDiags::EndSourceFile | ( |  | ) |
| override

Definition at line 299 of file Diagnostics.cpp.

References clang::clangd::None.

## ◆ HandleDiagnostic()

void clang::clangd::StoreDiags::HandleDiagnostic | ( | DiagnosticsEngine::Level | DiagLevel,
|  | const clang::Diagnostic & | Info
| ) |  |
| override

Definition at line 304 of file Diagnostics.cpp.

References clang::clangd::DiagBase::Category, D, clang::clangd::DiagBase::File, FixIt, clang::clangd::DiagBase::InsideMainFile, clang::clangd::IgnoreDiagnostics::log(), clang::clangd::log(), clang::clangd::DiagBase::Message, clang::tidy::modernize::Message, clang::clangd::DiagBase::Range, clang::clangd::DiagBase::Severity, and clang::clangd::toTextEdit().

## ◆ take()

std::vector< Diag > clang::clangd::StoreDiags::take | ( |  | ) |

Definition at line 292 of file Diagnostics.cpp.

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

- Diagnostics.h
- Diagnostics.cpp