-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add support for combining conflicting exported names. #3954
Conversation
Depends on #3950 (dependency merged) |
23ad66c
to
3f37a25
Compare
auto operator==(const ImportIRInst& rhs) const -> bool { | ||
return ir_id == rhs.ir_id && inst_id == rhs.inst_id; | ||
} |
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.
auto operator==(const ImportIRInst& rhs) const -> bool { | |
return ir_id == rhs.ir_id && inst_id == rhs.inst_id; | |
} | |
auto operator==(const ImportIRInst& rhs) const -> bool = default; |
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.
In file included from toolchain/sem_ir/name.cpp:8:
In file included from ./toolchain/sem_ir/file.h:20:
./toolchain/sem_ir/import_ir.h:33:8: error: explicitly defaulted equality comparison operator is implicitly deleted [-Werror,-Wdefaulted-function-deleted]
auto operator==(const ImportIRInst& rhs) const -> bool = default;
^
./toolchain/sem_ir/import_ir.h:28:30: note: defaulted 'operator==' is implicitly deleted because there is no viable three-way comparison function for base class 'Printable<Carbon::SemIR::ImportIRInst>'
struct ImportIRInst : public Printable<ImportIRInst> {
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.
Adding an explicit operator== to Printable fixes this, but makes all other children comparable too. I'm not sure that's what we want. Will follow up separately.
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
…e#3954) I think this is a key remaining bit of polish for intra-package exports. Next I'm going to be dealing with cross-package exports, though I think the fundamentals here will remain intact. Extern declarations could cause issues for the current approach, but I think that can be addressed separately. I don't think it's a fundamental problem, more just incremental. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
I think this is a key remaining bit of polish for intra-package exports. Next I'm going to be dealing with cross-package exports, though I think the fundamentals here will remain intact.
Extern declarations could cause issues for the current approach, but I think that can be addressed separately. I don't think it's a fundamental problem, more just incremental.