aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/function/driver.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-01-02 14:28:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-01-02 14:28:10 +0200
commit8d743ac19a1b0c15deccfb14525eaeef56b4135b (patch)
treea6ef7627068939f3de8f09c14d06ae67c313a3ab /unit-tests/function/driver.cxx
parentaed0c46abaebd54e2df3777aaabf461c877012f7 (diff)
Fix few undefined behavior (ubsan) bugs
Diffstat (limited to 'unit-tests/function/driver.cxx')
-rw-r--r--unit-tests/function/driver.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/unit-tests/function/driver.cxx b/unit-tests/function/driver.cxx
index 80c4120..627f76a 100644
--- a/unit-tests/function/driver.cxx
+++ b/unit-tests/function/driver.cxx
@@ -23,13 +23,13 @@ namespace build2
};
static dir_path
- scoped (const scope&, dir_path d)
+ scoped (const scope*, dir_path d)
{
return d;
}
static void
- scoped_void (const scope&, dir_path)
+ scoped_void (const scope*, dir_path)
{
}
@@ -54,8 +54,8 @@ namespace build2
f["ambig"] = [](names a, optional<string>) {return a;};
f["ambig"] = [](names a, optional<uint64_t>) {return a;};
- f["scoped"] = [](const scope&, names a) {return a;};
- f["scoped_void"] = [](const scope&, names) {};
+ f["scoped"] = [](const scope*, names a) {return a;};
+ f["scoped_void"] = [](const scope*, names) {};
f["scoped"] = &scoped;
f["scoped_void"] = &scoped_void;
@@ -76,7 +76,7 @@ namespace build2
1,
function_overload::arg_variadic,
function_overload::types (arg_bool, 1),
- [] (const scope&, vector_view<value> args, const function_overload&)
+ [] (const scope*, vector_view<value> args, const function_overload&)
{
return value (static_cast<uint64_t> (args.size ()));
}));
@@ -90,7 +90,7 @@ namespace build2
0,
function_overload::arg_variadic,
function_overload::types (),
- [] (const scope&, vector_view<value> args, const function_overload&)
+ [] (const scope*, vector_view<value> args, const function_overload&)
{
for (value& a: args)
{