diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2020-03-05 11:42:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-05 11:42:54 -0800 |
commit | 04039407e6308070c148de0d5e93640ec1b0a341 (patch) | |
tree | b66f63d49df0713b1ca2a440bec89f1d60af32a4 /src/proof/resolution_bitvector_proof.cpp | |
parent | 18fe192c29a9a2c37d1925730af01e906b9888c5 (diff) |
Enable -Wshadow and fix warnings. (#3909)
Fixes all -Wshadow warnings and enables the -Wshadow compile flag globally.
Co-authored-by: Clark Barrett <barrett@cs.stanford.edu>
Co-authored-by: Andres Noetzli <andres.noetzli@gmail.com>
Co-authored-by: Aina Niemetz <aina.niemetz@gmail.com>
Co-authored-by: Alex Ozdemir <aozdemir@hmc.edu>
Co-authored-by: makaimann <makaim@stanford.edu>
Co-authored-by: yoni206 <yoni206@users.noreply.github.com>
Co-authored-by: Andrew Reynolds <andrew.j.reynolds@gmail.com>
Co-authored-by: AleksandarZeljic <zeljic@stanford.edu>
Co-authored-by: Caleb Donovick <cdonovick@users.noreply.github.com>
Co-authored-by: Amalee <amaleewilson@gmail.com>
Co-authored-by: Scott Kovach <dskovach@gmail.com>
Co-authored-by: ntsis <nekuna@gmail.com>
Diffstat (limited to 'src/proof/resolution_bitvector_proof.cpp')
-rw-r--r-- | src/proof/resolution_bitvector_proof.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/proof/resolution_bitvector_proof.cpp b/src/proof/resolution_bitvector_proof.cpp index 8d4b56d54..120397d08 100644 --- a/src/proof/resolution_bitvector_proof.cpp +++ b/src/proof/resolution_bitvector_proof.cpp @@ -366,10 +366,8 @@ void LfscResolutionBitVectorProof::printTheoryLemmaProof( if (possibleMatch.getKind() == kind::OR) { - for (unsigned i = 0; i < possibleMatch.getNumChildren(); ++i) + for (const Expr& lit : possibleMatch) { - Expr lit = possibleMatch[i]; - if (lit.getKind() == kind::NOT) { os << "(intro_assump_t _ _ _ "; @@ -434,13 +432,13 @@ void LfscResolutionBitVectorProof::printTheoryLemmaProof( // conflict has a FALSE assertion in it; this can happen in some corner // cases, where the FALSE is the result of a rewrite. - for (unsigned i = 0; i < lemma.size(); ++i) + for (const Expr& lit : lemma) { - if (lemma[i].getKind() == kind::NOT && lemma[i][0] == utils::mkFalse()) + if (lit.getKind() == kind::NOT && lit[0] == utils::mkFalse()) { Debug("pf::bv") << "Lemma has a (not false) literal" << std::endl; os << "(clausify_false "; - os << ProofManager::getLitName(lemma[i]); + os << ProofManager::getLitName(lit); os << ")"; return; } |