From: Michael Wallner Date: Tue, 5 Sep 2017 06:51:39 +0000 (+0200) Subject: validate: check anonymous decl X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=37fe426aa3baf848defd86d77412ca87af46cc4e;p=m6w6%2Fext-psi validate: check anonymous decl --- diff --git a/src/types/decl.c b/src/types/decl.c index 95122ab..51dd733 100644 --- a/src/types/decl.c +++ b/src/types/decl.c @@ -85,6 +85,10 @@ static inline bool psi_decl_validate_func(struct psi_data *data, { struct psi_func_redir *redir; + if (!func->var->name) { + data->error(data, func->token, PSI_WARNING, "Anonymous decl!"); + return false; + } if (!strcmp(func->var->name, "dlsym")) { data->error(data, func->token, PSI_WARNING, "Cannot dlsym dlsym (sic!)");