Skip to content

Commit 7514995

Browse files
committed
Add missing virtual destructor
1 parent 90c56b3 commit 7514995

File tree

9 files changed

+16
-12
lines changed

9 files changed

+16
-12
lines changed

jbmc/src/java_bytecode/java_bytecode_parse_tree.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ class java_bytecode_parse_treet
8484
is_private(false), is_static(false), is_final(false)
8585
{
8686
}
87+
88+
virtual ~membert() = default;
8789
};
8890

8991
class methodt:public membert

src/goto-instrument/accelerate/disjunctive_polynomial_acceleration.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ class disjunctive_polynomial_accelerationt:public loop_accelerationt
5656
utils.find_modified(loop, modified);
5757
}
5858

59+
virtual ~disjunctive_polynomial_accelerationt() = default;
60+
5961
virtual bool accelerate(path_acceleratort &accelerator);
6062

6163
bool fit_polynomial(

src/goto-instrument/accelerate/enumerating_loop_acceleration.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ class enumerating_loop_accelerationt:public loop_accelerationt
5656
{
5757
}
5858

59+
virtual ~enumerating_loop_accelerationt() = default;
60+
5961
virtual bool accelerate(path_acceleratort &accelerator);
6062

6163
protected:

src/goto-instrument/accelerate/polynomial_accelerator.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ class polynomial_acceleratort
5858
{
5959
}
6060

61+
virtual ~polynomial_acceleratort() = default;
62+
6163
virtual bool accelerate(patht &loop, path_acceleratort &accelerator);
6264

6365
bool fit_polynomial(

src/goto-instrument/rw_set.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class rw_set_baset
4040
{
4141
}
4242

43-
~rw_set_baset() {}
43+
virtual ~rw_set_baset() = default;
4444

4545
struct entryt
4646
{
@@ -136,8 +136,6 @@ class _rw_set_loct:public rw_set_baset
136136
{
137137
}
138138

139-
~_rw_set_loct() {}
140-
141139
protected:
142140
value_setst &value_sets;
143141
const goto_programt::const_targett target;
@@ -192,8 +190,6 @@ class rw_set_loct:public _rw_set_loct
192190
{
193191
compute();
194192
}
195-
196-
~rw_set_loct() {}
197193
};
198194

199195
// another producer, this time for entire functions
@@ -213,8 +209,6 @@ class rw_set_functiont:public rw_set_baset
213209
compute_rec(function);
214210
}
215211

216-
~rw_set_functiont() {}
217-
218212
protected:
219213
const namespacet ns;
220214
value_setst &value_sets;
@@ -258,8 +252,6 @@ class rw_set_with_trackt:public _rw_set_loct
258252
compute();
259253
}
260254

261-
~rw_set_with_trackt() {}
262-
263255
protected:
264256
/* flag and variable in the expression, from which we dereference */
265257
bool dereferencing;

src/pointer-analysis/value_set.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ class value_sett
4545
{
4646
}
4747

48+
virtual ~value_sett() = default;
49+
4850
static bool field_sensitive(
4951
const irep_idt &id,
5052
const typet &type,

src/solvers/floatbv/float_bv.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ class float_bvt
2222
{
2323
}
2424

25-
~float_bvt()
26-
{
27-
}
25+
virtual ~float_bvt() = default;
2826

2927
exprt operator()(const exprt &src)
3028
{

src/solvers/refinement/string_refinement_util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ class sparse_arrayt
7979
/// Complexity is linear in the number of entries.
8080
virtual exprt at(std::size_t index) const;
8181

82+
virtual ~sparse_arrayt() = default;
83+
8284
protected:
8385
exprt default_value;
8486
std::map<std::size_t, exprt> entries;

src/util/endianness_map.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ class endianness_mapt
4141
{
4242
}
4343

44+
virtual ~endianness_mapt() = default;
45+
4446
size_t map_bit(size_t bit) const
4547
{
4648
assert(bit<map.size());

0 commit comments

Comments
 (0)