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);
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.
ChainedDiagnosticConsumer - Chain two diagnostic clients so that diagnostics go to the first client a...
virtual bool IncludeInDiagnosticCounts() const
Indicates whether the diagnostics handled by this DiagnosticConsumer should be included in the number...
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...
Defines the Diagnostic-related interfaces.
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.
Dataflow Directional Tag Classes.
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.
A little helper class (which is basically a smart pointer that forwards info from DiagnosticsEngine) ...
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.