Skip to content

fix: group overloads per access level #895

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 1 commit into from
Apr 7, 2025

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Apr 5, 2025

The OverloadFinalizer groups functions for one access level and "static" level. However, the ID assigned to the overloads only took the parent and function name into account. This meant that functions of the same name in a different access level would map to the same ID and be discarded if that ID already existed (emplace behavior).

The ID for overloads now takes the access level and "static" level into account.

@cppalliance-bot
Copy link

An automated preview of the documentation is available at https://895.mrdocs.prtest2.cppalliance.org/index.html

@Nerixyz Nerixyz force-pushed the fix/overload-grouping branch from 68943f1 to c6e6a6f Compare April 5, 2025 15:04
@cppalliance-bot
Copy link

An automated preview of the documentation is available at https://895.mrdocs.prtest2.cppalliance.org/index.html

@Nerixyz Nerixyz force-pushed the fix/overload-grouping branch from c6e6a6f to 38c51f3 Compare April 5, 2025 16:36
@cppalliance-bot
Copy link

An automated preview of the documentation is available at https://895.mrdocs.prtest2.cppalliance.org/index.html

@alandefreitas
Copy link
Collaborator

Oh... That's nice. Is it good to go?

@Nerixyz
Copy link
Contributor Author

Nerixyz commented Apr 6, 2025

Yes, this is good to go.

@alandefreitas
Copy link
Collaborator

I just noticed the test in test-files/golden-tests/config/overloads/visibility.cpp won't form any overload sets. It's good to check if it's not forming when it shouldn't form but also forming these separate sets when they are expected by the PR.

@Nerixyz Nerixyz force-pushed the fix/overload-grouping branch from 38c51f3 to 744c9bc Compare April 6, 2025 14:56
@cppalliance-bot
Copy link

An automated preview of the documentation is available at https://895.mrdocs.prtest2.cppalliance.org/index.html

@alandefreitas
Copy link
Collaborator

OK. Merging it after #896.

@alandefreitas alandefreitas force-pushed the fix/overload-grouping branch from 744c9bc to 19b7b0c Compare April 7, 2025 16:42
@cppalliance-bot
Copy link

An automated preview of the documentation is available at https://895.mrdocs.prtest2.cppalliance.org/index.html

@alandefreitas alandefreitas merged commit 287e588 into cppalliance:develop Apr 7, 2025
11 checks passed
@Nerixyz Nerixyz deleted the fix/overload-grouping branch April 7, 2025 17:28
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.

3 participants