CBMC
cpp_storage_spec.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: Michael Tautschnig
6 
7 \*******************************************************************/
8 
9 #include "cpp_storage_spec.h"
10 
11 #include <util/type.h>
12 
13 void cpp_storage_spect::read(const typet &type)
14 {
15  if(type.id() == ID_merged_type || type.id() == ID_function_type)
16  {
17  for(const typet &subtype : to_type_with_subtypes(type).subtypes())
18  read(subtype);
19  }
20  else if(type.id() == ID_static)
21  set_static();
22  else if(type.id() == ID_extern)
23  set_extern();
24  else if(type.id() == ID_auto)
25  set_auto();
26  else if(type.id() == ID_register)
27  set_register();
28  else if(type.id() == ID_mutable)
29  set_mutable();
30  else if(type.id() == ID_thread_local)
32  else if(type.id() == ID_asm)
33  set_asm();
34  else if(type.id() == ID_weak)
35  set_weak();
36 }
const irep_idt & id() const
Definition: irep.h:384
The type of an expression, extends irept.
Definition: type.h:29
Defines typet, type_with_subtypet and type_with_subtypest.
const type_with_subtypest & to_type_with_subtypes(const typet &type)
Definition: type.h:252