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

Fix cpp20 source location test failure resulting from newer compiler #1326

Merged
merged 3 commits into from
Jun 22, 2023

Conversation

dmachaj
Copy link
Contributor

@dmachaj dmachaj commented Jun 22, 2023

What's this all about?
Fix a test case failure caused by changing compiler behavior in a newer compiler version. The signature that MSVC provides for source_location has changed recently.

Instead of chasing the full decorated name, with each compiler having a slight variation, we now match just the meaningful substring that we care about "FailOnLine15". This should now be stable across compilers and across compiler versions.

Fixes: #1325

kennykerr
kennykerr previously approved these changes Jun 22, 2023
Copy link
Collaborator

@kennykerr kennykerr left a comment

Choose a reason for hiding this comment

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

Thanks!

@sylveon
Copy link
Contributor

sylveon commented Jun 22, 2023

Would it make more sense to validate that functionNameSv contains the name of the function instead of using a strict ==

@dmachaj
Copy link
Contributor Author

dmachaj commented Jun 22, 2023

Would it make more sense to validate that functionNameSv contains the name of the function instead of using a strict ==

That's a good point. That should still provide the validation we need while also being far more stable. Great suggestion 👍

@kennykerr kennykerr merged commit d3bb275 into microsoft:master Jun 22, 2023
96 checks passed
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.

Bug: cpp20 source location test case failure
3 participants