10 #ifndef LLVM_CLANG_FRONTEND_CHAINEDDIAGNOSTICCONSUMER_H
11 #define LLVM_CLANG_FRONTEND_CHAINEDDIAGNOSTICCONSUMER_H
24 virtual void anchor();
25 std::unique_ptr<DiagnosticConsumer> OwningPrimary;
27 std::unique_ptr<DiagnosticConsumer> Secondary;
31 std::unique_ptr<DiagnosticConsumer> Secondary)
32 : OwningPrimary(std::move(Primary)), Primary(OwningPrimary.get()),
33 Secondary(std::move(Secondary)) {}
37 std::unique_ptr<DiagnosticConsumer> Secondary)
38 : Primary(Primary), Secondary(std::move(Secondary)) {}
43 Secondary->BeginSourceFile(LO, PP);
47 Secondary->EndSourceFile();
66 Secondary->HandleDiagnostic(DiagLevel, Info);
ChainedDiagnosticConsumer(DiagnosticConsumer *Primary, std::unique_ptr< DiagnosticConsumer > Secondary)
Construct without taking ownership of Primary.
void EndSourceFile() override
Callback to inform the diagnostic client that processing of a source file has ended.
virtual void EndSourceFile()
Callback to inform the diagnostic client that processing of a source file has ended.
Abstract interface, implemented by clients of the front-end, which formats and prints fully processed...
void BeginSourceFile(const LangOptions &LO, const Preprocessor *PP) override
Callback to inform the diagnostic client that processing of a source file is beginning.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
virtual bool IncludeInDiagnosticCounts() const
Indicates whether the diagnostics handled by this DiagnosticConsumer should be included in the number...
bool IncludeInDiagnosticCounts() const override
Indicates whether the diagnostics handled by this DiagnosticConsumer should be included in the number...
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.
virtual void finish()
Callback to inform the diagnostic client that processing of all source files 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.
Defines the Diagnostic-related interfaces.
ChainedDiagnosticConsumer(std::unique_ptr< DiagnosticConsumer > Primary, std::unique_ptr< DiagnosticConsumer > Secondary)
void finish() override
Callback to inform the diagnostic client that processing of all source files has ended.
Level
The level of the diagnostic, after it has been through mapping.
virtual void BeginSourceFile(const LangOptions &LangOpts, const Preprocessor *PP=nullptr)
Callback to inform the diagnostic client that processing of a source file is beginning.
Engages in a tight little dance with the lexer to efficiently preprocess tokens.