conditions: use set_extra_expr_mod() to change extra states
[smatch.git] / validation / type1.c
blob2a55f2a91cb78d588bcd65d35bcfc470f73f986a
1 /*
2 * Sparse used to get this wrong.
4 * When evaluating the argument to the inline function for the array, Sparse
5 * didn't properly demote the "char []" to a "char *", but instead it would
6 * follow the dereference and get a "struct hello".
8 * Which made no sense at all.
9 */
11 static inline int deref(const char *s)
13 return *s;
16 struct hello {
17 char array[10];
20 static int test(struct hello *arg)
22 return deref(arg->array);
26 * check-name: "char []" to "char *" demotion