Skip to content

Commit 5d5e9e1

Browse files
committed
Fix clang-18 compilation issue
1 parent 44a7255 commit 5d5e9e1

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

source/parse.h

+16-12
Original file line numberDiff line numberDiff line change
@@ -1913,20 +1913,10 @@ struct compound_statement_node
19131913
return open_brace;
19141914
}
19151915

1916-
auto add_statement(
1916+
auto add_statement(
19171917
std::unique_ptr<statement_node>&& statement,
19181918
int before_pos
1919-
)
1920-
-> bool
1921-
{
1922-
// Adopt this statement into our list of statements
1923-
statements.insert(
1924-
statements.begin() + std::clamp( before_pos, 0, unchecked_narrow<int>(std::ssize(statements)) ),
1925-
std::move(statement)
1926-
);
1927-
1928-
return true;
1929-
}
1919+
) -> bool;
19301920

19311921
auto visit(auto& v, int depth) -> void;
19321922
};
@@ -2320,6 +2310,20 @@ auto alternative_node::visit(auto& v, int depth)
23202310
v.end(*this, depth);
23212311
}
23222312

2313+
auto compound_statement_node::add_statement(
2314+
std::unique_ptr<statement_node>&& statement,
2315+
int before_pos
2316+
)
2317+
-> bool
2318+
{
2319+
// Adopt this statement into our list of statements
2320+
statements.insert(
2321+
statements.begin() + std::clamp( before_pos, 0, unchecked_narrow<int>(std::ssize(statements)) ),
2322+
std::move(statement)
2323+
);
2324+
2325+
return true;
2326+
}
23232327

23242328
auto compound_statement_node::visit(auto& v, int depth)
23252329
-> void

0 commit comments

Comments
 (0)