CBMC
cpp_typecheck_linkage_spec.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: C++ Language Type Checking
4 
5 Author: Daniel Kroening, kroening@cs.cmu.edu
6 
7 \*******************************************************************/
8 
11 
12 #include "cpp_typecheck.h"
13 
15 {
16  irep_idt old_linkage_spec=current_linkage_spec;
17 
18  current_linkage_spec=linkage_spec.linkage().get(ID_value);
19 
20  // there is a linkage spec "C++", which we know as "cpp"
21  if(current_linkage_spec=="C++")
22  current_linkage_spec=ID_cpp;
23 
24  // do the declarations
25  for(cpp_linkage_spect::itemst::iterator
26  it=linkage_spec.items().begin();
27  it!=linkage_spec.items().end();
28  it++)
29  convert(*it);
30 
31  // back to previous linkage spec
32  current_linkage_spec=old_linkage_spec;
33 }
const itemst & items() const
irep_idt current_linkage_spec
Definition: cpp_typecheck.h:95
void convert(cpp_linkage_spect &)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:38
const irep_idt & get(const irep_idt &name) const
Definition: irep.cpp:44
C++ Language Type Checking.