41 void remark(
const std::string &tag,
const std::vector<std::string> &lines)
const override;
43 void remark_note(
const std::string &tag,
const std::vector<std::string> &lines)
const override;
45 void warning_note(
const std::string &tag,
const std::vector<std::string> &lines)
const override;
47 void error_note(
const std::string &tag,
const std::vector<std::string> &lines)
const override;
49 void warning(
const std::string &tag,
const std::vector<std::string> &lines)
const override;
51 void error(
const std::string &tag,
const std::vector<std::string> &lines)
const override;
66 [[nodiscard]]
const std::vector<std::vector<std::string>> &
remarks()
const
78 [[nodiscard]]
const std::vector<std::vector<std::string>> &
remark_notes()
const
90 [[nodiscard]]
const std::vector<std::vector<std::string>> &
warning_notes()
const
92 return warning_notes_;
102 [[nodiscard]]
const std::vector<std::vector<std::string>> &
error_notes()
const
114 [[nodiscard]]
const std::vector<std::vector<std::string>> &
warnings()
const
126 [[nodiscard]]
const std::vector<std::vector<std::string>> &
errors()
const
141 return fatal_proximates_;
151 [[nodiscard]]
const std::vector<std::vector<std::string>> &
fatal_steps()
const
163 [[nodiscard]]
const std::vector<std::vector<std::string>> &
fatal_roots()
const
177 return remark_tag_counts_;
189 return remark_note_tag_counts_;
201 return warning_note_tag_counts_;
213 return error_note_tag_counts_;
225 return warning_tag_counts_;
237 return error_tag_counts_;
246 mutable std::vector<std::vector<std::string>> remarks_;
247 mutable std::vector<std::vector<std::string>> remark_notes_;
248 mutable std::vector<std::vector<std::string>> warning_notes_;
249 mutable std::vector<std::vector<std::string>> error_notes_;
250 mutable std::vector<std::vector<std::string>> warnings_;
251 mutable std::vector<std::vector<std::string>> errors_;
252 mutable std::vector<std::vector<std::string>> fatal_proximates_;
253 mutable std::vector<std::vector<std::string>> fatal_steps_;
254 mutable std::vector<std::vector<std::string>> fatal_roots_;
255 mutable std::map<std::string, size_t> remark_tag_counts_;
256 mutable std::map<std::string, size_t> remark_note_tag_counts_;
257 mutable std::map<std::string, size_t> warning_note_tag_counts_;
258 mutable std::map<std::string, size_t> error_note_tag_counts_;
259 mutable std::map<std::string, size_t> warning_tag_counts_;
260 mutable std::map<std::string, size_t> error_tag_counts_;
262 std::unique_ptr<TextFormatter> format_;
Testing implementation of UserDiagnostics that buffers all diagnostic output.
const std::map< std::string, size_t > & warning_tag_counts() const
Get the count of warn messages by tag.
const std::vector< std::vector< std::string > > & fatal_proximates() const
Get the buffered fatal proximate error messages.
void warning_note(const std::string &tag, const std::vector< std::string > &lines) const override
Display a tagged note message associated with a warning.
void emit_fatal_step(const Error &err) const override
Emit an intermediate step error in a fatal error chain.
const std::vector< std::vector< std::string > > & fatal_roots() const
Get the buffered fatal root error messages.
const std::vector< std::vector< std::string > > & warnings() const
Get the buffered warning messages.
const std::vector< std::vector< std::string > > & errors() const
Get the buffered error messages.
void emit_fatal_root(const Error &err) const override
Emit the root cause error in a fatal error chain.
const std::map< std::string, size_t > & warning_note_tag_counts() const
Get the count of warning-associated note messages by tag.
void emit_fatal_proximate(const Error &err) const override
Emit the proximate (immediate) error in a fatal error chain.
const std::vector< std::vector< std::string > > & remark_notes() const
Get the buffered remark-associated note messages.
const std::map< std::string, size_t > & remark_tag_counts() const
Get the count of remark messages by tag.
const std::map< std::string, size_t > & error_tag_counts() const
Get the count of error messages by tag.
const std::map< std::string, size_t > & remark_note_tag_counts() const
Get the count of remark-associated note messages by tag.
const std::map< std::string, size_t > & error_note_tag_counts() const
Get the count of error-associated note messages by tag.
const std::vector< std::vector< std::string > > & fatal_steps() const
Get the buffered fatal step error messages.
void remark(const std::string &tag, const std::vector< std::string > &lines) const override
Display a tagged remark message.
const std::vector< std::vector< std::string > > & remarks() const
Get the buffered remark messages.
const std::vector< std::vector< std::string > > & error_notes() const
Get the buffered error-associated note messages.
void remark_note(const std::string &tag, const std::vector< std::string > &lines) const override
Display a tagged note message associated with a remark.
const std::vector< std::vector< std::string > > & warning_notes() const
Get the buffered warning-associated note messages.
void error_note(const std::string &tag, const std::vector< std::string > &lines) const override
Display a tagged note message associated with an error.
BufferedUserDiagnostics()
Construct a BufferedUserDiagnostics with a PlainTextFormatter.
Abstract interface for all error types used in ChainableResult error chains.
TextFormatter implementation that strips all styling from text.
Abstract class for structured error reporting and diagnostic output.
const TextFormatter & formatter() const
@ warning
Emit a warning and continue decompilation.
@ error
Emit a formatted error and fail decompilation.