Skip to content

Commit e19e6ad

Browse files
committed
Remove empty assertion messages in a fews places
1 parent 539e139 commit e19e6ad

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

libsmtutil/CVC4Interface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ CVC4::Expr CVC4Interface::toCVC4Expr(Expression const& _expr)
278278
return m_context.mkExpr(CVC4::kind::APPLY_CONSTRUCTOR, c, arguments);
279279
}
280280

281-
smtAssert(false, "");
281+
smtAssert(false);
282282
}
283283
catch (CVC4::TypeCheckingException const& _e)
284284
{
@@ -289,7 +289,7 @@ CVC4::Expr CVC4Interface::toCVC4Expr(Expression const& _expr)
289289
smtAssert(false, _e.what());
290290
}
291291

292-
smtAssert(false, "");
292+
smtAssert(false);
293293

294294
// FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794)
295295
throw exception();

libsmtutil/Z3Interface.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,14 @@ z3::expr Z3Interface::toZ3Expr(Expression const& _expr)
264264
return constructor(args);
265265
}
266266

267-
smtAssert(false, "");
267+
smtAssert(false);
268268
}
269269
catch (z3::exception const& _e)
270270
{
271271
smtAssert(false, _e.msg());
272272
}
273273

274-
smtAssert(false, "");
274+
smtAssert(false);
275275

276276
// FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794)
277277
throw exception();
@@ -382,7 +382,7 @@ Expression Z3Interface::fromZ3Expr(z3::expr const& _expr)
382382
)
383383
return Expression(_expr.decl().name().str(), arguments, fromZ3Sort(_expr.get_sort()));
384384

385-
smtAssert(false, "");
385+
smtAssert(false);
386386

387387
// FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794)
388388
throw exception();

libsolidity/parsing/Parser.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,7 +1637,7 @@ ASTPointer<Statement> Parser::parseSimpleStatement(ASTPointer<ASTString> const&
16371637
return parseExpressionStatement(_docString, nodeFactory.createNode<TupleExpression>(components, false));
16381638
}
16391639
default:
1640-
solAssert(false, "");
1640+
solAssert(false);
16411641
}
16421642
}
16431643
else
@@ -1650,7 +1650,7 @@ ASTPointer<Statement> Parser::parseSimpleStatement(ASTPointer<ASTString> const&
16501650
case LookAheadInfo::Expression:
16511651
return parseExpressionStatement(_docString, expressionFromIndexAccessStructure(iap));
16521652
default:
1653-
solAssert(false, "");
1653+
solAssert(false);
16541654
}
16551655
}
16561656

@@ -1661,9 +1661,8 @@ ASTPointer<Statement> Parser::parseSimpleStatement(ASTPointer<ASTString> const&
16611661
bool Parser::IndexAccessedPath::empty() const
16621662
{
16631663
if (!indices.empty())
1664-
{
1665-
solAssert(!path.empty(), "");
1666-
}
1664+
solAssert(!path.empty());
1665+
16671666
return path.empty() && indices.empty();
16681667
}
16691668

0 commit comments

Comments
 (0)