Skip to content
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

Fix clang-18 compilation issue #1335

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jarzec
Copy link
Contributor

@jarzec jarzec commented Nov 9, 2024

Move the definition of compound_statement_node::add_statement() after the definition of statement_node::~statement_node() to fix compilation issue with clang-18.
Together with #1336 this PR makes all the tests pass on CI.

@jarzec jarzec force-pushed the ci-fix-clang-18-compil-issue branch from 01499ac to 5d5e9e1 Compare November 9, 2024 01:00
-> bool
{
// Adopt this statement into our list of statements
statements.insert(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Explanation] This call causes deletion of the std::unique_ptr<statement_node>. As discussed in #1088 this causes trouble for clang-18 if compound_statement_node::add_statement() is defiend before statement_node::~statement_node().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant