diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-11-03 23:53:15 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-11-03 23:53:15 +0100 |
commit | 41a1e45b6e9141a1a914f0ffbd5eb18436516159 (patch) | |
tree | e7c5ba83cf31999c0b03c81054cb9a8b8d0b6bec | |
parent | 9a5a8639d8cbd3ca438a0f001830d9c95f2828bc (diff) | |
parent | 63510eb0acb3babcda112adeb506c8f4f47158f1 (diff) | |
download | sparse-41a1e45b6e9141a1a914f0ffbd5eb18436516159.tar.gz |
Merge branch 'rem-unused'
-rw-r--r-- | ast-inspect.c | 2 | ||||
-rw-r--r-- | gdbhelpers | 3 | ||||
-rw-r--r-- | show-parse.c | 3 | ||||
-rw-r--r-- | symbol.c | 4 | ||||
-rw-r--r-- | symbol.h | 8 |
5 files changed, 4 insertions, 16 deletions
diff --git a/ast-inspect.c b/ast-inspect.c index 24d4a4a6..b510cd9b 100644 --- a/ast-inspect.c +++ b/ast-inspect.c @@ -109,9 +109,7 @@ static const char *symbol_type_name(enum type type) [SYM_STRUCT] = "SYM_STRUCT", [SYM_UNION] = "SYM_UNION", [SYM_ENUM] = "SYM_ENUM", - [SYM_TYPEDEF] = "SYM_TYPEDEF", [SYM_TYPEOF] = "SYM_TYPEOF", - [SYM_MEMBER] = "SYM_MEMBER", [SYM_BITFIELD] = "SYM_BITFIELD", [SYM_LABEL] = "SYM_LABEL", [SYM_RESTRICT] = "SYM_RESTRICT", @@ -152,9 +152,6 @@ define gdb_show_ctype if ($arg0->modifiers & MOD_ASSIGNED) printf "MOD_ASSIGNED " end - if ($arg0->modifiers & MOD_TYPE) - printf "MOD_TYPE " - end if ($arg0->modifiers & MOD_SAFE) printf "MOD_SAFE " end diff --git a/show-parse.c b/show-parse.c index 37104167..68b3e718 100644 --- a/show-parse.c +++ b/show-parse.c @@ -58,9 +58,7 @@ static void do_debug_symbol(struct symbol *sym, int indent) [SYM_STRUCT] = "strt", [SYM_UNION] = "unin", [SYM_ENUM] = "enum", - [SYM_TYPEDEF] = "tdef", [SYM_TYPEOF] = "tpof", - [SYM_MEMBER] = "memb", [SYM_BITFIELD] = "bitf", [SYM_LABEL] = "labl", [SYM_RESTRICT] = "rstr", @@ -142,7 +140,6 @@ const char *modifier_string(unsigned long mod) {MOD_NODEREF, "[noderef]"}, {MOD_TOPLEVEL, "[toplevel]"}, {MOD_ASSIGNED, "[assigned]"}, - {MOD_TYPE, "[type]"}, {MOD_SAFE, "[safe]"}, {MOD_USERTYPE, "[usertype]"}, {MOD_NORETURN, "[noreturn]"}, @@ -533,9 +533,7 @@ const char* get_type_name(enum type type) [SYM_STRUCT] = "struct", [SYM_UNION] = "union", [SYM_ENUM] = "enum", - [SYM_TYPEDEF] = "typedef", [SYM_TYPEOF] = "typeof", - [SYM_MEMBER] = "member", [SYM_BITFIELD] = "bitfield", [SYM_LABEL] = "label", [SYM_RESTRICT] = "restrict", @@ -744,7 +742,7 @@ static const struct ctype_declare { } ctype_declaration[] = { { &bool_ctype, SYM_BASETYPE, MOD_UNSIGNED, &bits_in_bool, &max_int_alignment, &int_type }, { &void_ctype, SYM_BASETYPE, 0, NULL, NULL, NULL }, - { &type_ctype, SYM_BASETYPE, MOD_TYPE, NULL, NULL, NULL }, + { &type_ctype, SYM_BASETYPE, 0, NULL, NULL, NULL }, { &incomplete_ctype,SYM_BASETYPE, 0, NULL, NULL, NULL }, { &bad_ctype, SYM_BASETYPE, 0, NULL, NULL, NULL }, @@ -64,9 +64,7 @@ enum type { SYM_STRUCT, SYM_UNION, SYM_ENUM, - SYM_TYPEDEF, SYM_TYPEOF, - SYM_MEMBER, SYM_BITFIELD, SYM_LABEL, SYM_RESTRICT, @@ -80,7 +78,7 @@ enum keyword { KW_MODIFIER = 1 << 1, KW_QUALIFIER = 1 << 2, KW_ATTRIBUTE = 1 << 3, - KW_STATEMENT = 1 << 4, + // KW UNUSED = 1 << 4, KW_ASM = 1 << 5, KW_MODE = 1 << 6, KW_SHORT = 1 << 7, @@ -224,7 +222,7 @@ struct symbol { #define MOD_UNSIGNED 0x00004000 #define MOD_EXPLICITLY_SIGNED 0x00008000 -#define MOD_TYPE 0x00010000 + // MOD UNUSED 0x00010000 #define MOD_USERTYPE 0x00020000 #define MOD_CHAR 0x00040000 #define MOD_SHORT 0x00080000 @@ -375,7 +373,7 @@ static inline int is_signed_type(struct symbol *sym) static inline int is_type_type(struct symbol *type) { - return (type->ctype.modifiers & MOD_TYPE) != 0; + return type == &type_ctype; } static inline int is_ptr_type(struct symbol *type) |