-
Notifications
You must be signed in to change notification settings - Fork 180
Fix some duplicate node id issues #3787
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
base: master
Are you sure you want to change the base?
Conversation
gcc/rust/ChangeLog: * ast/rust-ast.h (Type::reset_node_id): New member function. * ast/rust-path.h (TypePathSegment::reset_node_id): New member function. * expand/rust-node-id-fix-visitor.cc: New file. * expand/rust-node-id-fix-visitor.h: New file. * Make-lang.in: Add rust-node-id-fix-visitor.o. * expand/rust-derive-default.cc: Include "rust-node-id-fix-visitor.h". (DeriveDefault::visit_struct): Use NodeIdFixVisitor::fix. (DeriveDefault::visit_tuple): Likewise. * expand/rust-derive-eq.cc: Include "rust-node-id-fix-visitor.h". (DeriveEq::go): Use NodeIdFixVisitor::fix. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove entries. Signed-off-by: Owen Avery <[email protected]>
Hmm this smells like the a derive/desguar is cloning a node-id they should have unique ones. We've had these issues before early on. |
It would be better if we can drill down in on where these dups are comming from rather than add a pass to fix them |
It looks like the duplication is mostly coming from |
Hmm yeah need to see why thats being called that rings a bell from a good while back... do you mind if i take a look into this too |
Oh wait i think i see what you mean a bit more... |
i found the fixes for this: #3792 We actually have a few stray clones going on that need fixed. I think its better to finish filling out the builder than making a new pass to add new getters/setters on the AST. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @philberty, you're treating the symptoms rather than the disease. Those node ids shouldn't have been duplicated in the first place.
No description provided.