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

C++: Actually check function names in MaD #18114

Merged
merged 4 commits into from
Nov 27, 2024

Conversation

MathiasVP
Copy link
Contributor

This PR fixes quite an embarrassing bug: We forgot to check the function name when matching MaD models with Functions when dealing with non-member functions 😱

That's ... quite bad. Luckily, there are several reasons for why this went unnoticed for 4 months:

  • The only non-member models we have is boost::asio::buffer and std::format
  • We were still correctly validating the signature, which meant that very few spurious functions were being matched.

Commit-by-commit review recommended. The last commit is just a cleanup of the conjuncts.

@MathiasVP MathiasVP requested a review from a team as a code owner November 26, 2024 14:00
@github-actions github-actions bot added the C++ label Nov 26, 2024
@MathiasVP MathiasVP added the no-change-note-required This PR does not need a change note label Nov 26, 2024
@geoffw0
Copy link
Contributor

geoffw0 commented Nov 27, 2024

We were still correctly validating the signature, which meant that very few spurious functions were being matched.

It looks like we were also validating the name for non-member functions where we didn't provide an [optional] signature as well, but there was indeed a rather large issue with non-member functions where a signature was provided.

Copy link
Contributor

@geoffw0 geoffw0 left a comment

Choose a reason for hiding this comment

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

LGTM.

@MathiasVP MathiasVP merged commit d86fea5 into github:main Nov 27, 2024
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ no-change-note-required This PR does not need a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants