summaryrefslogtreecommitdiff
path: root/src/expr/expr_template.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-04-08 15:23:20 -0500
committerGitHub <noreply@github.com>2018-04-08 15:23:20 -0500
commitdf4fce8f41319c80ca13e20aefdad1dd32cb42bd (patch)
treeec469663b43132b0fab144b5678a7120d4e98e83 /src/expr/expr_template.cpp
parente8f753f8ace5611c7204f390b7590a125e2bfa2a (diff)
Check free variables in assertions (#1737)
Diffstat (limited to 'src/expr/expr_template.cpp')
-rw-r--r--src/expr/expr_template.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/expr/expr_template.cpp b/src/expr/expr_template.cpp
index 010b36e94..f812be5a3 100644
--- a/src/expr/expr_template.cpp
+++ b/src/expr/expr_template.cpp
@@ -530,6 +530,13 @@ bool Expr::isConst() const {
return d_node->isConst();
}
+bool Expr::hasFreeVariable() const
+{
+ ExprManagerScope ems(*this);
+ Assert(d_node != NULL, "Unexpected NULL expression pointer!");
+ return d_node->hasFreeVar();
+}
+
void Expr::toStream(std::ostream& out, int depth, bool types, size_t dag,
OutputLanguage language) const {
ExprManagerScope ems(*this);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback