9#ifndef LLVM_CLANG_FRONTEND_CHAINEDDIAGNOSTICCONSUMER_H
10#define LLVM_CLANG_FRONTEND_CHAINEDDIAGNOSTICCONSUMER_H
23 virtual void anchor();
24 std::unique_ptr<DiagnosticConsumer> OwningPrimary;
26 std::unique_ptr<DiagnosticConsumer> Secondary;
30 std::unique_ptr<DiagnosticConsumer> Secondary)
31 : OwningPrimary(
std::move(Primary)), Primary(OwningPrimary.get()),
32 Secondary(
std::move(Secondary)) {}
36 std::unique_ptr<DiagnosticConsumer> Secondary)
37 : Primary(Primary), Secondary(
std::move(Secondary)) {}
42 Secondary->BeginSourceFile(LO, PP);
46 Secondary->EndSourceFile();
65 Secondary->HandleDiagnostic(DiagLevel, Info);
Defines the Diagnostic-related interfaces.
ChainedDiagnosticConsumer - Chain two diagnostic clients so that diagnostics go to the first client a...
void BeginSourceFile(const LangOptions &LO, const Preprocessor *PP) override
Callback to inform the diagnostic client that processing of a source file is beginning.
ChainedDiagnosticConsumer(std::unique_ptr< DiagnosticConsumer > Primary, std::unique_ptr< DiagnosticConsumer > Secondary)
void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) override
Handle this diagnostic, reporting it to the user or capturing it to a log as needed.
bool IncludeInDiagnosticCounts() const override
Indicates whether the diagnostics handled by this DiagnosticConsumer should be included in the number...
void EndSourceFile() override
Callback to inform the diagnostic client that processing of a source file has ended.
ChainedDiagnosticConsumer(DiagnosticConsumer *Primary, std::unique_ptr< DiagnosticConsumer > Secondary)
Construct without taking ownership of Primary.
void finish() override
Callback to inform the diagnostic client that processing of all source files has ended.
Abstract interface, implemented by clients of the front-end, which formats and prints fully processed...
virtual void EndSourceFile()
Callback to inform the diagnostic client that processing of a source file has ended.
virtual void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info)
Handle this diagnostic, reporting it to the user or capturing it to a log as needed.
virtual void finish()
Callback to inform the diagnostic client that processing of all source files has ended.
virtual bool IncludeInDiagnosticCounts() const
Indicates whether the diagnostics handled by this DiagnosticConsumer should be included in the number...
virtual void BeginSourceFile(const LangOptions &LangOpts, const Preprocessor *PP=nullptr)
Callback to inform the diagnostic client that processing of a source file is beginning.
A little helper class (which is basically a smart pointer that forwards info from DiagnosticsEngine) ...
Level
The level of the diagnostic, after it has been through mapping.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Engages in a tight little dance with the lexer to efficiently preprocess tokens.
The JSON file list parser is used to communicate input to InstallAPI.