Skip to content

[CI] Fix clang-18 C++23 build of cppfront #1187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions source/parse.h
Original file line number Diff line number Diff line change
Expand Up @@ -2273,7 +2273,13 @@ struct parameter_declaration_node

std::unique_ptr<declaration_node> declaration;

parameter_declaration_node(parameter_declaration_list_node const* my) : my_list{my} { }
// Out-of-line definition of the ctor is necessary due to the forward-declared
// type(s) used in a std::unique_ptr as a member
parameter_declaration_node(parameter_declaration_list_node const* my);

// Out-of-line definition of the dtor is necessary due to the forward-declared
// type(s) used in a std::unique_ptr as a member
~parameter_declaration_node();

// API
//
Expand Down Expand Up @@ -2859,6 +2865,10 @@ struct declaration_node
: parent_declaration{parent}
{ }

// Out-of-line definition of the dtor is necessary due to the forward-declared
// type(s) used in a std::unique_ptr as a member
~declaration_node();

// API
//

Expand Down Expand Up @@ -4512,7 +4522,13 @@ struct translation_unit_node
}
};

// Definitions of out-of-line dtors for nodes with unique_ptr members of forward-declared types
// Definitions of out-of-line ctors & dtors for nodes with unique_ptr members of forward-declared types

parameter_declaration_node::parameter_declaration_node(parameter_declaration_list_node const* my)
: my_list{my}
{ }

parameter_declaration_node::~parameter_declaration_node() = default;

type_id_node::~type_id_node() = default;

Expand All @@ -4536,6 +4552,8 @@ inspect_expression_node::~inspect_expression_node() = default;

statement_node::~statement_node() = default;

declaration_node::~declaration_node() = default;


//-----------------------------------------------------------------------
//
Expand Down
Loading