cprover
cpp_util.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author:
6 
7 \*******************************************************************/
8 
9 #include "cpp_util.h"
10 
11 #include <util/expr.h>
12 #include <util/symbol.h>
13 
15 {
16  exprt tmp(ID_symbol, symbol.type);
17  tmp.set(ID_identifier, symbol.name);
18 
19  if(symbol.is_lvalue)
20  tmp.set(ID_C_lvalue, true);
21 
22  return tmp;
23 }
irep_idt name
The unique identifier.
Definition: symbol.h:46
Symbol table entry.
Symbol table entry.This is a symbol in the symbol table, stored in an object of type symbol_tablet...
Definition: symbol.h:33
typet type
Type of symbol.
Definition: symbol.h:37
Base class for all expressions.
Definition: expr.h:46
exprt cpp_symbol_expr(const symbolt &symbol)
Definition: cpp_util.cpp:14
void set(const irep_namet &name, const irep_idt &value)
Definition: irep.h:214
bool is_lvalue
Definition: symbol.h:71