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