Several virtual desctructors were missing. Even though there might not
have been actual leaks or similar bugs, it is worth fixing these
locations as they might lead to bugs in the future.
Clang also warns at these locations:
warning: delete called on non-final 'abigail::ir::corpus' that has virtual
functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
* include/abg-comparison.h: add virtual destructor for corpus_diff and diff_node_visitor
* include/abg-corpus.h: add virtual destructor for corpus
* include/abg-reporter.h: add virtual destructor for reporter_base
* include/abg-traverse.h: add virtual destructor for traversable_base
Signed-off-by: Matthias Maennich <maennich@google.com>
class diff_stats;
+ virtual ~corpus_diff() {}
+
/// A convenience typedef for a shared pointer to @ref diff_stats
typedef shared_ptr<diff_stats> diff_stats_sptr;
diff_node_visitor();
+ virtual ~diff_node_visitor() {}
+
diff_node_visitor(visiting_kind k);
visiting_kind
corpus(ir::environment*, const string& path= "");
+ virtual ~corpus() {}
+
const environment*
get_environment() const;
report(const corpus_diff& d, ostream& out,
const string& indent = "") const = 0;
+ virtual ~reporter_base() {}
}; //end class reporter_base
class default_reporter;
traversable_base()
: visiting_()
{}
+
+ virtual ~traversable_base() {}
+
/// This virtual method is overloaded and implemented by any single
/// type which instance is going to be visited during the traversal
/// of translation unit nodes.