Lines Matching refs:sym
92 static bool check_symbol_deprecated(const struct symbol *const sym)
95 const struct ident *id = sym->ident;
105 warning(sym->pos,
116 static void check_symbol_visibility(const struct symbol *const sym)
118 const unsigned long mod = sym->ctype.modifiers;
119 const char *const name = show_ident(sym->ident);
129 warning(sym->pos,
139 warning(sym->pos,
145 if (sym->same_symbol)
148 if (sym->ident == &main_ident)
151 warning(sym->pos,
157 static struct symbol *unwrap_base_type(const struct symbol *sym)
159 switch (sym->ctype.base_type->type) {
163 return unwrap_base_type(sym->ctype.base_type);
165 return sym->ctype.base_type;
172 static bool is_terminated_with_null_struct(const struct symbol *const sym)
174 const struct expression *const arr_init = sym->initializer;
193 static void check_struct_array_initializer(const struct symbol *const sym)
195 if (is_terminated_with_null_struct(sym))
198 warning(sym->pos,
203 static void check_test_struct(const struct symbol *const sym)
207 struct expression *init = sym->initializer;
210 if (!sym->ctype.base_type)
213 ctype_name = sym->ctype.base_type->ident;
223 if (sym->ident != tst_test_test)
251 static void do_symbol_checks(struct symbol *sym)
253 if (check_symbol_deprecated(sym))
256 check_symbol_visibility(sym);
257 check_test_struct(sym);
263 struct symbol *sym;
265 FOR_EACH_PTR(list, sym) {
268 do_symbol_checks(sym);
270 expand_symbol(sym);
271 ep = linearize_symbol(sym);
279 } END_FOR_EACH_PTR(sym);