CBMC
cl_message_handler.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Print messages like CL.exe does
4 
5 Author: Michael Tautschnig
6 
7 \*******************************************************************/
8 
9 #ifndef CPROVER_GOTO_CC_CL_MESSAGE_HANDLER_H
10 #define CPROVER_GOTO_CC_CL_MESSAGE_HANDLER_H
11 
12 #include <util/cout_message.h>
13 
15 {
16 public:
17  void print(unsigned, const xmlt &) override
18  {
19  }
20 
21  void print(unsigned, const jsont &) override
22  {
23  }
24 
25  // aims to imitate the messages CL prints
26  void print(
27  unsigned level,
28  const std::string &message,
29  const source_locationt &location) override;
30 
32 
35  void print_warnings_as_errors(bool yes)
36  {
37  warnings_are_errors = yes;
38  }
39 
40 private:
41  bool warnings_are_errors = false;
42 };
43 
44 #endif // CPROVER_GOTO_CC_CL_MESSAGE_HANDLER_H
void print(unsigned, const jsont &) override
void print_warnings_as_errors(bool yes)
With yes set to true, prefix warnings with an error message.
void print(unsigned, const xmlt &) override
void print(unsigned, const xmlt &) override
Definition: cout_message.h:32
void print(unsigned, const xmlt &) override
Definition: cout_message.h:32
Definition: json.h:27
Definition: xml.h:21