diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-10-01 22:44:14 +0200 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-11-30 14:05:03 +0100 |
commit | b187d1bbd61f49fd8008be7091a13df5600bcea6 (patch) | |
tree | 8c15b3bf683ae4e7c40112e1e991f4c7c6bcf73d | |
parent | 63d2c3d5f7c6e3684f164a6959ceb5986595ba42 (diff) | |
download | sparse-b187d1bbd61f49fd8008be7091a13df5600bcea6.tar.gz |
bitfield: keep the bitfield ident
While issuing a diagnostic related to a bitfield, it's useful
to display the bitfield's name. Unfortunately, this name is not
stored in the symbol and thus is only available during parsing.
Fix this by adding the ident to the symbol initialization.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | parse.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1972,6 +1972,7 @@ static struct token *handle_bitfield(struct token *token, struct decl_state *ctx } bitfield->bit_size = width; bitfield->endpos = token->pos; + bitfield->ident = *ctx->ident; return token; } |