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

AST: Various cleanups #2664

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

AST: Various cleanups #2664

wants to merge 1 commit into from

Conversation

ajor
Copy link
Member

@ajor ajor commented Jul 4, 2023

I'll wait for #2624 to go into master before I merge this, as there'll be conflicts.

  • Use move ctors for std::string and SizedType
  • Remove explicit keywords on multi-arg ctors (they were a hold-over from when the ctors were single-argument, before locations were added)
  • Use in-class initialisers instead of member initialisers for constants

- Use move ctors for std::string and SizedType
- Remove explicit keywords on multi-arg ctors (they were a hold-over
  from when the ctors were single-argument, before locations were added)
- Use in-class initialisers instead of member initialisers for constants
@@ -633,7 +618,7 @@ Map::Map(const Map &other) : Expression(other)
}

FieldAccess::FieldAccess(const FieldAccess &other)
: Expression(other), expr(nullptr)
: Expression(other) // TODO why not copy expr??
Copy link
Member Author

Choose a reason for hiding this comment

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

@fbs Do you remember if expr wasn't copied for a reason?

Copy link
Contributor

Choose a reason for hiding this comment

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

nope :(

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.

None yet

2 participants