diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2021-03-10 15:58:11 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-10 23:58:11 +0000 |
commit | 982d1bea6ec9ac9b8932f99762ab2b3908958f32 (patch) | |
tree | 4f5ba9a5559d9b273a514f60eb9b354555e74b95 /src/parser/smt2/Smt2.g | |
parent | 489209a31c2a2bf2f5ce465c1a79f73aad90c764 (diff) |
Use Assert instead of assert. (#6095)
This commit replaces all uses of assert with Assert from base/check.h to ensure that all assertions get checked in production builds with enabled assertions.
Diffstat (limited to 'src/parser/smt2/Smt2.g')
-rw-r--r-- | src/parser/smt2/Smt2.g | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/parser/smt2/Smt2.g b/src/parser/smt2/Smt2.g index 93d0de8f7..e1e1f1cb1 100644 --- a/src/parser/smt2/Smt2.g +++ b/src/parser/smt2/Smt2.g @@ -77,6 +77,7 @@ using namespace CVC4::parser; #include <memory> +#include "base/check.h" #include "parser/antlr_tracing.h" #include "parser/parse_op.h" #include "parser/parser.h" @@ -1718,13 +1719,13 @@ termAtomic[CVC4::api::Term& atomTerm] // Bit-vector constants | HEX_LITERAL { - assert(AntlrInput::tokenText($HEX_LITERAL).find("#x") == 0); + Assert(AntlrInput::tokenText($HEX_LITERAL).find("#x") == 0); std::string hexStr = AntlrInput::tokenTextSubstr($HEX_LITERAL, 2); atomTerm = SOLVER->mkBitVector(hexStr, 16); } | BINARY_LITERAL { - assert(AntlrInput::tokenText($BINARY_LITERAL).find("#b") == 0); + Assert(AntlrInput::tokenText($BINARY_LITERAL).find("#b") == 0); std::string binStr = AntlrInput::tokenTextSubstr($BINARY_LITERAL, 2); atomTerm = SOLVER->mkBitVector(binStr, 2); } @@ -1850,7 +1851,7 @@ str[std::string& s, bool fsmtlib] { // Handle SMT-LIB >=2.5 standard escape '""'. ++q; - assert(*q == '"'); + Assert(*q == '"'); } else if (!PARSER_STATE->escapeDupDblQuote() && *q == '\\') { @@ -1858,7 +1859,7 @@ str[std::string& s, bool fsmtlib] // Handle SMT-LIB 2.0 standard escapes '\\' and '\"'. if (*q != '\\' && *q != '"') { - assert(*q != '\0'); + Assert(*q != '\0'); *p++ = '\\'; } } |