xref: /illumos-gate/usr/src/tools/smatch/src/evaluate.h (revision cd61ae21816e53b94bc1673f3f1aa651fc3115e8)
1 #ifndef EVALUATE_H
2 #define EVALUATE_H
3 
4 struct expression;
5 struct statement;
6 struct symbol;
7 struct symbol_list;
8 
9 ///
10 // evaluate the type of an expression
11 // @expr: the expression to be evaluated
12 // @return: the type of the expression or ``NULL``
13 //	if the expression can't be evaluated
14 struct symbol *evaluate_expression(struct expression *expr);
15 
16 ///
17 // evaluate the type of a statement
18 // @stmt: the statement to be evaluated
19 // @return: the type of the statement or ``NULL``
20 //	if it can't be evaluated
21 struct symbol *evaluate_statement(struct statement *stmt);
22 
23 ///
24 // evaluate the type of a set of symbols
25 // @list: the list of the symbol to be evaluated
26 void evaluate_symbol_list(struct symbol_list *list);
27 
28 #endif
29