CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cpp_enum_type.cpp
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: C++ Language Type Checking
4
5Author: Daniel Kroening, kroening@cs.cmu.edu
6
7\*******************************************************************/
8
11
12#include "cpp_enum_type.h"
13
17
19{
20 // This will only clash with anon enums that would have
21 // clashes on the enum constants anyway.
22
23 const irept::subt &b=body().get_sub();
24
25 std::string result="#anonE";
26
27 for(const auto &value : b)
28 {
29 result+='#';
30 result += id2string(value.get(ID_name));
31 }
32
33 return result;
34}
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
const irept & body() const
irep_idt generate_anon_tag() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition dstring.h:38
The type of an expression, extends irept.
Definition type.h:29
C++ Language Type Checking.
const std::string & id2string(const irep_idt &d)
Definition irep.h:44