2 * smatch/smatch_unknown_value.c
4 * Copyright (C) 2014 Oracle.
6 * Licensed under the Open Software License version 1.1
11 * The situation here is that we often need to fake an assignment but we don't
12 * know anything about the right hand side of the assignment. We use a fake
13 * function call of &llong_ctype. The reason for using a function call instead
14 * of a value is so we don't start storing the equivalence.
20 struct ident fake_assign
= {
21 .len
= sizeof("fake assign"),
22 .name
= "fake assign",
25 static struct symbol fake_fn_symbol
= {
27 .ident
= &fake_assign
,
29 .base_type
= &llong_ctype
,
33 static struct symbol fake_node_symbol
= {
35 .ident
= &fake_assign
,
37 .base_type
= &fake_fn_symbol
,
41 static struct expression fake_fn_expr
= {
43 .ctype
= &llong_ctype
,
44 .symbol
= &fake_node_symbol
,
45 .symbol_name
= &fake_assign
,
48 static struct expression fake_call
= {
50 .ctype
= &llong_ctype
,
54 struct expression
*unknown_value_expression(struct expression
*expr
)
59 int is_fake_call(struct expression
*expr
)
61 return expr
== &fake_call
;