db: use the struct_member_callbacks to save container_of() information
commit5f89264ec7b7b11ba4127bec70714a9a030b8dd8
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 10 Oct 2017 10:35:09 +0000 (10 13:35 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 10 Oct 2017 10:35:09 +0000 (10 13:35 +0300)
treebabc5caaf6e7803fe2903e663214ca0830c49902
parent2e95eacc96d64daaddcb0b3ee8aed0ee14dd52e7
db: use the struct_member_callbacks to save container_of() information

We first look up to see if the container_of() is used.  Then we try to
find the container.  Then we use the existing struct_member_callbacks to
print the information.

The downside of this approach is that you need to build the DB twice at a
minimum to store any container_of() information.  But we already have that
requirement to build the DB twice or more for other thins.  Really the idea
is that you build the DB every morning...

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_db.c