Skip to content

Changed _Unfancy_maybe_null() to _Unfancy() - #2508

Merged
Stephan T. Lavavej (StephanTLavavej) merged 2 commits into
microsoft:mainfrom
DadTech:change-to-unfancy
Feb 1, 2022
Merged

Changed _Unfancy_maybe_null() to _Unfancy()#2508
Stephan T. Lavavej (StephanTLavavej) merged 2 commits into
microsoft:mainfrom
DadTech:change-to-unfancy

Conversation

@DadTech

@DadTech DadTech commented Jan 29, 2022

Copy link
Copy Markdown
Contributor

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 Stephan T. Lavavej (StephanTLavavej) added the enhancement Something can be improved label Jan 29, 2022
@StephanTLavavej

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Member

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

@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit b11945b into microsoft:main Feb 1, 2022
@StephanTLavavej

Copy link
Copy Markdown
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