-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Simplify control flow in _Traits_find_MEOW_not_of
#5006
Simplify control flow in _Traits_find_MEOW_not_of
#5006
Conversation
Except in `_Traits_find_last_of`, which is being changed by GH 4934.
This will simplify the following transformation.
Both sides unconditionally return, allowing us to flip them. (One case is a forever loop where the only ways out are returns.)
This comment was marked as resolved.
This comment was marked as resolved.
In `_Traits_meow` functions with `if (condition) { woof; } return;` where `woof` is a `for` containing at least two `if`s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is such a nice simplification, I thought I'd push another commit to do some early-return outdenting.
... to avoid merge conflicts with microsoftGH-4934. This partially reverts commit 8d902d9.
These return statements are never reached.
😻 Looks purr to me! |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
A merge conflict? Couldn't be me. |
Remember, I named you Casey "Conflict" Carter via office post-it note almost a decade ago! 🎯 💯 🔮 |
This simplifies
_Traits_find_first_not_of
and_Traits_find_last_not_of
, following the patterns in #4744 and #4934, which will make them easier to understand and easier to add vectorized codepaths. These are lossless transformations that don't affect behavior.break
s with immediatereturn
s._Traits_find_last_of
, which is being changed by Vectorizebasic_string::find_last_of
#4934.return
instead of relying on fall-through.!_Matches._Mark
tests._Special=false
" to fall-through._Elem
._Hay_start
,_Hay_end
.bool _Special
into its usage.