Lines Matching defs:sym
61 *base_type(struct symbol *sym),
147 struct symbol *sym = expr->symbol;
149 if (!sym) {
150 sym = lookup_symbol(expr->symbol_name, NS_SYMBOL);
152 if (!sym) {
153 sym = alloc_symbol(expr->pos, SYM_BAD);
154 bind_symbol(sym, expr->symbol_name, NS_SYMBOL);
155 sym->kind = expr->op ?: 'v'; /* see EXPR_CALL */
159 if (!sym->ctype.base_type)
160 sym->ctype.base_type = &bad_ctype;
162 return sym;
167 struct symbol *sym = expr_symbol(expr);
168 struct symbol *ret = base_type(sym);
173 reporter->r_symbol(fix_mode(ret, mode), &expr->pos, sym);
195 static void report_memdef(struct symbol *sym, struct symbol *mem)
198 if (sym && mem->ident)
199 reporter->r_memdef(sym, mem);
257 static struct symbol *base_type(struct symbol *sym)
259 if (!sym)
262 if (sym->type == SYM_NODE)
263 examine_sym_node(sym, NULL);
265 return sym->ctype.base_type // builtin_fn_type
613 static inline struct symbol *do_symbol(struct symbol *sym)
615 struct symbol *type = base_type(sym);
619 reporter->r_symdef(sym);
623 if (!sym->initializer)
625 reporter->r_symbol(U_W_VAL, &sym->pos, sym);
627 dissect_ctx = sym;
628 do_initializer(type, sym->initializer);
632 stmt = sym->ctype.modifiers & MOD_INLINE
639 show_ident(dctx->ident), show_ident(sym->ident));
641 dissect_ctx = sym;
652 DO_LIST(list, sym, do_symbol(sym));