summaryrefslogtreecommitdiff
path: root/test/unit/node/node_black.cpp
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2021-05-21 09:05:45 -0700
committerGitHub <noreply@github.com>2021-05-21 16:05:45 +0000
commitbb39d534c89dc2569aa048bb053196bfa5bbb3a1 (patch)
treebe677fe7153c13cb36fac6d376ba24a78eeda763 /test/unit/node/node_black.cpp
parent23b990946473910eb8c781d555a4600efeb05b4b (diff)
Support braced-init-lists with `mkNode()` (#6580)
This commit adds support for braced-init-lists in calls to `mkNode()`, e.g., `mkNode(REGEXP_EMPTY, {})`. Previously, such a call would result in a node of kind `REGEXP_EMPTY` with a single null node as a child because the compiler chose the `mkNode(Kind kind, TNode child1)` variant and converted `{}` to a node using the default constructor. This commit adds an overload of `mkNode()` that takes an `initializer_list<TNode>` to allow this use case. It also adds a `mkNode()` overload with zero children for convenience and removes the 4- and 5-children variants because they saw little use. Finally, it makes the default constructor of `NodeTemplate` explicit to avoid accidental conversions.
Diffstat (limited to 'test/unit/node/node_black.cpp')
-rw-r--r--test/unit/node/node_black.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/unit/node/node_black.cpp b/test/unit/node/node_black.cpp
index 2309c0ac7..852f06dbc 100644
--- a/test/unit/node/node_black.cpp
+++ b/test/unit/node/node_black.cpp
@@ -620,7 +620,7 @@ TEST_F(TestNodeBlackNode, dagifier)
Node fgx_eq_gy = d_nodeManager->mkNode(EQUAL, fgx, gy);
Node n = d_nodeManager->mkNode(
- OR, fffx_eq_x, fffx_eq_y, fx_eq_gx, x_eq_y, fgx_eq_gy);
+ OR, {fffx_eq_x, fffx_eq_y, fx_eq_gx, x_eq_y, fgx_eq_gy});
std::stringstream sstr;
sstr << Node::setdepth(-1) << Node::setlanguage(language::output::LANG_CVC);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback