corpus: is_empty: consider actual translation unit contents
authorMatthias Maennich <maennich@google.com>
Mon, 13 Jan 2020 14:44:50 +0000 (14:44 +0000)
committerMatthias Maennich <maennich@google.com>
Mon, 20 Jan 2020 14:52:30 +0000 (14:52 +0000)
commit750b652b695d38efd83f8fbc1576d31d6e327b9d
tree910415c01031f07b35662ec616bdb076c1d10cbb
parent53d10a789db27f984a6d73d0fe514404ff08ac50
corpus: is_empty: consider actual translation unit contents

A corpus with completely filtered out symbols (exhaustive whitelist),
still contains compilation units, but they are empty. A list of empty
translation units shall be considered empty as no entries need to be
considered. That is useful to skip empty corpora when writing out the
xml for them.

Hence, teach is_empty() to have a look at the actual translation units.

* src/abg-corpus.cc (corpus::is_empty): consider a list of
  empty members to be empty.

Reviewed-by: Dodji Seketeli <dodji@seketeli.org>
Signed-off-by: Matthias Maennich <maennich@google.com>
src/abg-corpus.cc