diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2018-06-20 20:28:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-20 20:28:50 -0700 |
commit | 5f997ea7363bd29ae53b57051ebac8d1da8f9439 (patch) | |
tree | ddcae46a71db87da31ca6d83e3dd3ee9098ace22 /src/theory/quantifiers | |
parent | dd0bd217e222b2db5fac9aedee3aacee8a28d0b1 (diff) |
Fix warnings and enable -Wnon-virtual-dtor warning (#2079)
This commit fixes warnings for an unused variable, comparison of two
different types and add virtual destructors to classes that were
previously missing them. It also enables the -Wnon-virtual-dtor warning
which warns about any class definition with virtual methods that does
not have a virtual destructor (except if the destructor is protected).
This flag is supported by both clang and GCC and not enabled by default.
Diffstat (limited to 'src/theory/quantifiers')
-rw-r--r-- | src/theory/quantifiers/dynamic_rewrite.cpp | 3 | ||||
-rw-r--r-- | src/theory/quantifiers/dynamic_rewrite.h | 2 | ||||
-rw-r--r-- | src/theory/quantifiers/sygus/cegis.h | 2 | ||||
-rw-r--r-- | src/theory/quantifiers/sygus/cegis_unif.h | 2 | ||||
-rw-r--r-- | src/theory/quantifiers/sygus/sygus_module.h | 2 | ||||
-rw-r--r-- | src/theory/quantifiers/sygus/sygus_unif_strat.h | 2 | ||||
-rw-r--r-- | src/theory/quantifiers/sygus_sampler.h | 2 |
7 files changed, 8 insertions, 7 deletions
diff --git a/src/theory/quantifiers/dynamic_rewrite.cpp b/src/theory/quantifiers/dynamic_rewrite.cpp index 00e527aba..27f36cbf3 100644 --- a/src/theory/quantifiers/dynamic_rewrite.cpp +++ b/src/theory/quantifiers/dynamic_rewrite.cpp @@ -24,8 +24,7 @@ namespace theory { namespace quantifiers { DynamicRewriter::DynamicRewriter(const std::string& name, QuantifiersEngine* qe) - : d_qe(qe), - d_equalityEngine(qe->getUserContext(), "DynamicRewriter::" + name, true), + : d_equalityEngine(qe->getUserContext(), "DynamicRewriter::" + name, true), d_rewrites(qe->getUserContext()) { d_equalityEngine.addFunctionKind(kind::APPLY_UF); diff --git a/src/theory/quantifiers/dynamic_rewrite.h b/src/theory/quantifiers/dynamic_rewrite.h index 56f591470..9d80ebe57 100644 --- a/src/theory/quantifiers/dynamic_rewrite.h +++ b/src/theory/quantifiers/dynamic_rewrite.h @@ -65,8 +65,6 @@ class DynamicRewriter bool areEqual(Node a, Node b); private: - /** pointer to the quantifiers engine */ - QuantifiersEngine* d_qe; /** index over argument types to function skolems * * The purpose of this trie is to associate a class of interpreted operator diff --git a/src/theory/quantifiers/sygus/cegis.h b/src/theory/quantifiers/sygus/cegis.h index 856219b73..6330bbd30 100644 --- a/src/theory/quantifiers/sygus/cegis.h +++ b/src/theory/quantifiers/sygus/cegis.h @@ -42,7 +42,7 @@ class Cegis : public SygusModule { public: Cegis(QuantifiersEngine* qe, CegConjecture* p); - ~Cegis() {} + ~Cegis() override {} /** initialize */ virtual bool initialize(Node n, const std::vector<Node>& candidates, diff --git a/src/theory/quantifiers/sygus/cegis_unif.h b/src/theory/quantifiers/sygus/cegis_unif.h index ec338a8b2..c0f860975 100644 --- a/src/theory/quantifiers/sygus/cegis_unif.h +++ b/src/theory/quantifiers/sygus/cegis_unif.h @@ -200,7 +200,7 @@ class CegisUnif : public Cegis { public: CegisUnif(QuantifiersEngine* qe, CegConjecture* p); - ~CegisUnif(); + ~CegisUnif() override; /** Retrieves enumerators for constructing solutions * * Non-unification candidates have themselves as enumerators, while for diff --git a/src/theory/quantifiers/sygus/sygus_module.h b/src/theory/quantifiers/sygus/sygus_module.h index b01f8e1d0..fb2821e20 100644 --- a/src/theory/quantifiers/sygus/sygus_module.h +++ b/src/theory/quantifiers/sygus/sygus_module.h @@ -49,7 +49,7 @@ class SygusModule { public: SygusModule(QuantifiersEngine* qe, CegConjecture* p); - ~SygusModule() {} + virtual ~SygusModule() {} /** initialize * * n is the "base instantiation" of the deep-embedding version of the diff --git a/src/theory/quantifiers/sygus/sygus_unif_strat.h b/src/theory/quantifiers/sygus/sygus_unif_strat.h index cbce5e70c..db0ff4afb 100644 --- a/src/theory/quantifiers/sygus/sygus_unif_strat.h +++ b/src/theory/quantifiers/sygus/sygus_unif_strat.h @@ -93,6 +93,8 @@ std::ostream& operator<<(std::ostream& os, StrategyType st); class UnifContext { public: + virtual ~UnifContext() {} + /** Get the current role * * In a particular context when constructing solutions in synthesis by diff --git a/src/theory/quantifiers/sygus_sampler.h b/src/theory/quantifiers/sygus_sampler.h index 5e0a24dd2..1b4d3aedd 100644 --- a/src/theory/quantifiers/sygus_sampler.h +++ b/src/theory/quantifiers/sygus_sampler.h @@ -278,6 +278,8 @@ class SygusSampler : public LazyTrieEvaluator class NotifyMatch { public: + virtual ~NotifyMatch() {} + /** * A notification that s is equal to n * { vars -> subs }. This function * should return false if we do not wish to be notified of further matches. |