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

Changed _Unfancy_maybe_null() to _Unfancy() #2508

Merged
merged 2 commits into from
Feb 1, 2022

Conversation

DadTech
Copy link
Contributor

@DadTech DadTech commented Jan 29, 2022

Fixes #2470 and changes instances of _Unfancy_maybe_null() to _Unfancy().

@DadTech DadTech requested a review from a team as a code owner January 29, 2022 00:22
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Jan 29, 2022
@StephanTLavavej
Copy link
Member

I looked at all of the codepaths that can call this function, and I don't believe that any of them can pass null pointers now, so this appears to be completely correct. 🎉

@StephanTLavavej
Copy link
Member

By the way, I've edited your PR description to say "Fixes" instead of "Addresses". This activates GitHub's close/fix/resolve syntax, which will automatically close the issue when this PR is merged. (Otherwise it's just a "mention" without auto-closing behavior.)

Copy link
Member

@CaseyCarter CaseyCarter left a comment

Choose a reason for hiding this comment

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

LGTM as well. I pushed a small change to document the non-null preconditions with _STL_INTERNAL_CHECK so they'll be nicely visible.

@StephanTLavavej StephanTLavavej self-assigned this Jan 31, 2022
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit b11945b into microsoft:main Feb 1, 2022
@StephanTLavavej
Copy link
Member

Thanks for improving this code, and congratulations on your first microsoft/STL pull request! 😸 🎉 🚀

This change will appear in VS 2022 17.2 Preview 2 along with the rest of the ASan <vector> changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<vector>: _Apply_annotation() should be able to _Unfancy()
5 participants