clang-tools 8.0.0

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

`#include <TUScheduler.h>`

## Public Member Functions
virtual | ~ParsingCallbacks ()=default
virtual void | onPreambleAST (PathRef Path, ASTContext &Ctx, std::shared_ptr< clang::Preprocessor > PP)
| Called on the AST that was built for emitting the preamble. More...
virtual void | onMainAST (PathRef Path, ParsedAST &AST)
| Called on the AST built for the file itself. More...
virtual void | onDiagnostics (PathRef File, std::vector< Diag > Diags)
| Called whenever the diagnostics for `File` are produced. More...
virtual void | onFileUpdated (PathRef File, const TUStatus &Status)
| Called whenever the TU status is updated. More...

## Detailed Description

Definition at line 87 of file TUScheduler.h.

## Constructor & Destructor Documentation

## ◆ ~ParsingCallbacks()

virtual clang::clangd::ParsingCallbacks::~ParsingCallbacks | ( |  | ) |
| virtual default

## Member Function Documentation

## ◆ onDiagnostics()

virtual void clang::clangd::ParsingCallbacks::onDiagnostics | ( | PathRef | File,
|  | std::vector< Diag > | Diags
| ) |  |
| inline virtual

Called whenever the diagnostics for `File` are produced.

Definition at line 109 of file TUScheduler.h.

## ◆ onFileUpdated()

virtual void clang::clangd::ParsingCallbacks::onFileUpdated | ( | PathRef | File,
|  | const TUStatus & | Status
| ) |  |
| inline virtual

Called whenever the TU status is updated.

Definition at line 112 of file TUScheduler.h.

## ◆ onMainAST()

virtual void clang::clangd::ParsingCallbacks::onMainAST | ( | PathRef | Path,
|  | ParsedAST & | AST
| ) |  |
| inline virtual

Called on the AST built for the file itself.

Note that preamble AST nodes are not deserialized and should be processed in the onPreambleAST call instead. The `AST` always contains all AST nodes for the main file itself, and only a portion of the AST nodes deserialized from the preamble. Note that some nodes from the preamble may have been deserialized and may also be accessed from the main file AST, e.g. redecls of functions from preamble, etc. Clients are expected to process only the AST nodes from the main file in this callback (obtained via ParsedAST::getLocalTopLevelDecls) to obtain optimal performance.

Definition at line 106 of file TUScheduler.h.

## ◆ onPreambleAST()

virtual void clang::clangd::ParsingCallbacks::onPreambleAST | ( | PathRef | Path,
|  | ASTContext & | Ctx,
|  | std::shared_ptr< clang::Preprocessor > | PP
| ) |  |
| inline virtual

Called on the AST that was built for emitting the preamble.

The built AST contains only AST nodes from the #include directives at the start of the file. AST node in the current file should be observed on onMainAST call.

Definition at line 94 of file TUScheduler.h.

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

- TUScheduler.h