Details
- Reviewers
ldionne • Quuxplusone Mordante - Group Reviewers
Restricted Project - Commits
- rG7402ec8f3877: [libc++] Remove if-else to make branch predictor happy
Diff Detail
Event Timeline
This LGTM but can you please rebase onto main and update the review? That will run the CI again, which failed in the format checks (but those should not be a hard error).
Ship it when CI is green.
Also LGTM. To clarify @ldionne's comment: Normally buildkite runs a clang-format check, which is allowed to "soft-fail" (it'll tell you that clang-format disagrees with the patch's style, but it won't break the build, and you'll still end up with a green light from buildkite). In this PR, though, you caught main at a bad time: the clang-format check was "hard-failing" because of a misconfiguration. The misconfiguration was fixed in ff0ada4e1607385be30b2b38885cea2127568e04. So, if you rebase, then you should see buildkite (either soft-fail or pass) the clang-format check as intended, and then it'll run the rest of the tests. If the rest of the tests are green, then ship it!
Thanks for all the detailed reviewed messages. I am a newcomer here. This rebased patch is updated by manually create. If anything wrong please notify me.
Nice patch, LGTM! Note it seems the build bot acted strange, can you rebase to start a new CI job?
The CI fails is caused by my mistake, for the previous function, we can't call the _Traits::eq since the _Traits doesn't exist in the function signature. Now the CI should pass, but the code change (*this)[__i] = (__c == __one); needs to be reviewed again, I don't know if it violates the code style.
libcxx/include/bitset | ||
---|---|---|
777–778 | Here you could use char_traits<_CharT>::eq(__c, __one) if you like. I don't think it matters which expression you use, in that they all do the same thing in practice and the Standard doesn't seem to tell us which to pick in theory. I have the weakest of preferences for the idea of using == directly and saving a template instantiation, which is exactly what you're doing, so, LGTM. |
libcxx/include/bitset | ||
---|---|---|
777–778 | Thank you for clarify! |
The CI is green, I don't have the commit access, could you reviewers please commit it?
Can you provide the git author string you'd want the commit attributed to, i.e. Real Name <email@address>?
When here, please update this part too.