CBMC
Loading...
Searching...
No Matches
gcc_message_handler.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module:
4
5Author: Daniel Kroening, kroening@kroening.com
6
7\*******************************************************************/
8
9#ifndef CPROVER_GOTO_CC_GCC_MESSAGE_HANDLER_H
10#define CPROVER_GOTO_CC_GCC_MESSAGE_HANDLER_H
11
12#include <util/cout_message.h>
13
15{
16public:
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 gcc prints
26 void print(unsigned level, const std::string &message) override;
27
28 void print(
29 unsigned level,
30 const std::string &message,
31 const source_locationt &location) override;
32
40
41private:
42 bool warnings_are_errors = false;
43
45 std::string string(const messaget::commandt &c) const
46 {
47 return command(c.command);
48 }
49};
50
51#endif // CPROVER_GOTO_CC_GCC_MESSAGE_HANDLER_H
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
std::string command(unsigned c) const override
Create an ECMA-48 SGR (Select Graphic Rendition) command with given code.
void print_warnings_as_errors(bool yes)
With yes set to true, prefix warnings with "error:" instead of "warning:".
void print(unsigned, const jsont &) override
std::string string(const messaget::commandt &c) const
feed a command into a string
void print(unsigned, const xmlt &) override
Definition json.h:27
Definition xml.h:21