aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-03-18 15:05:28 (GMT)
committerDan Carpenter <dan.carpenter@oracle.com>2019-03-18 15:05:28 (GMT)
commit58500480b16863e33408e268bd6f8274658e37dc (patch)
treeb06d209fdc4d409fd1362571add5fbed260396f8
parent33d704b6238b2ce6e7f1308f23e1ca3a0e233ca7 (diff)
mtag: delete totally bogus get_deref_mtag()
The get_deref_mtag() was looking up stuff in the mtag_map which is totally nuts. The mtag map is a map of how pointers are contained in other pointers... There was no way this function did anything useful. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
-rw-r--r--smatch_mtag.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/smatch_mtag.c b/smatch_mtag.c
index 90b6aff..fa45948 100644
--- a/smatch_mtag.c
+++ b/smatch_mtag.c
@@ -181,33 +181,6 @@ int get_toplevel_mtag(struct symbol *sym, mtag_t *tag)
return 1;
}
-int get_deref_mtag(struct expression *expr, mtag_t *tag)
-{
- mtag_t container_tag, member_tag;
- int offset;
-
- /*
- * I'm not totally sure what I'm doing...
- *
- * This is supposed to get something like "global_var->ptr", but I don't
- * feel like it's complete at all.
- *
- */
-
- if (!get_mtag(expr->unop, &container_tag))
- return 0;
-
- offset = get_member_offset_from_deref(expr);
- if (offset < 0)
- return 0;
-
- if (!mtag_map_select_tag(container_tag, -offset, &member_tag))
- return 0;
-
- *tag = member_tag;
- return 1;
-}
-
static void global_variable(struct symbol *sym)
{
mtag_t tag;
@@ -296,12 +269,6 @@ int get_mtag(struct expression *expr, mtag_t *tag)
goto dec_cnt;
}
break;
- case EXPR_DEREF:
- if (get_deref_mtag(expr, tag)) {
- ret = 1;
- goto dec_cnt;
- }
- break;
}
dec_cnt:

Privacy Policy