cprover
typecheck.cpp
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module:
4
5
Author: Daniel Kroening, kroening@kroening.com
6
7
\*******************************************************************/
8
9
#include "
typecheck.h
"
10
11
#include "
invariant.h
"
12
13
bool
typecheckt::typecheck_main
()
14
{
15
PRECONDITION
(
message_handler
);
16
17
const
unsigned
errors_before=
18
message_handler
->
get_message_count
(
messaget::M_ERROR
);
19
20
try
21
{
22
typecheck
();
23
}
24
25
catch
(
int
)
26
{
27
error
();
28
}
29
30
catch
(
const
char
*e)
31
{
32
error
() << e <<
eom
;
33
}
34
35
catch
(
const
std::string &e)
36
{
37
error
() << e <<
eom
;
38
}
39
40
return
message_handler
->
get_message_count
(
messaget::M_ERROR
)!=errors_before;
41
}
messaget::eom
static eomt eom
Definition:
message.h:297
messaget::error
mstreamt & error() const
Definition:
message.h:399
typecheck.h
PRECONDITION
#define PRECONDITION(CONDITION)
Definition:
invariant.h:464
messaget::M_ERROR
@ M_ERROR
Definition:
message.h:170
messaget::message_handler
message_handlert * message_handler
Definition:
message.h:439
invariant.h
typecheckt::typecheck
virtual void typecheck()=0
typecheckt::typecheck_main
virtual bool typecheck_main()
Definition:
typecheck.cpp:13
message_handlert::get_message_count
std::size_t get_message_count(unsigned level) const
Definition:
message.h:56
util
typecheck.cpp
Generated by
1.8.20