cprover
goto_function.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: A GOTO Function
4 
5 Author: Daniel Kroening
6 
7 Date: May 2018
8 
9 \*******************************************************************/
10 
11 #include "goto_function.h"
12 
14  const goto_functiont &goto_function,
15  std::set<irep_idt> &dest)
16 {
17  goto_function.body.get_decl_identifiers(dest);
18 
19  const code_typet::parameterst &parameters = goto_function.type.parameters();
20 
21  // add parameters
22  for(const auto &param : parameters)
23  {
24  const irep_idt &identifier = param.get_identifier();
25  if(identifier != "")
26  dest.insert(identifier);
27  }
28 }
void get_local_identifiers(const goto_functiont &goto_function, std::set< irep_idt > &dest)
goto_programt body
Definition: goto_function.h:23
std::vector< parametert > parameterst
Definition: std_types.h:767
code_typet type
Definition: goto_function.h:24
void get_decl_identifiers(decl_identifierst &decl_identifiers) const
get the variables in decl statements
const parameterst & parameters() const
Definition: std_types.h:905