From 8d464edb305218ee26fef91d364349a34734eafa Mon Sep 17 00:00:00 2001 From: Sonny Martin Date: Tue, 4 Sep 2018 04:24:16 +0100 Subject: [PATCH 1/2] Invariant cleanup --- src/util/irep.cpp | 1 - src/util/irep.h | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/util/irep.cpp b/src/util/irep.cpp index af2f3f18831..1eec748f5d3 100644 --- a/src/util/irep.cpp +++ b/src/util/irep.cpp @@ -13,7 +13,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "invariant.h" #include "string2int.h" #include "string_hash.h" #include "irep_hash.h" diff --git a/src/util/irep.h b/src/util/irep.h index e7cea0710fc..f1fb120fa2c 100644 --- a/src/util/irep.h +++ b/src/util/irep.h @@ -10,11 +10,11 @@ Author: Daniel Kroening, kroening@kroening.com #ifndef CPROVER_UTIL_IREP_H #define CPROVER_UTIL_IREP_H -#include #include #include #include "deprecate.h" +#include "invariant.h" #include "irep_ids.h" #define SHARING @@ -192,7 +192,7 @@ class irept if(data!=&empty_d) { // NOLINTNEXTLINE(build/deprecated) - assert(data->ref_count!=0); + PRECONDITION(data->ref_count != 0); data->ref_count++; #ifdef IREP_DEBUG std::cout << "COPY " << data << " " << data->ref_count << '\n'; From f0522e7ecdb32bdb31e34547b66032ca38d3247f Mon Sep 17 00:00:00 2001 From: Sonny Martin Date: Thu, 6 Sep 2018 09:33:17 +0100 Subject: [PATCH 2/2] Add missing cassert header --- src/cpp/cpp_typecheck_fargs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cpp/cpp_typecheck_fargs.h b/src/cpp/cpp_typecheck_fargs.h index fac18356d7f..e97a9f8a1b3 100644 --- a/src/cpp/cpp_typecheck_fargs.h +++ b/src/cpp/cpp_typecheck_fargs.h @@ -12,6 +12,8 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #ifndef CPROVER_CPP_CPP_TYPECHECK_FARGS_H #define CPROVER_CPP_CPP_TYPECHECK_FARGS_H +#include + #include class cpp_typecheckt;