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

Improve itype layout #40162

Merged
merged 2 commits into from
May 5, 2020
Merged

Conversation

jbytheway
Copy link
Contributor

Summary

SUMMARY: None

Purpose of change

One side-effect of the nested containers change was that clang-tidy started reporting about excessive padding in itype. The check was temporarily disabled because we didn't want additional churn in that PR. Now we want to re-enable it.

Describe the solution

Re-enable that check and rearrange the fields in itype. Mostly just moving all the public members to the start of the class, which allows two bool members to be adjacent where they previously weren't. That ought to be enough to reduce the padding sufficiently.

Describe alternatives you've considered

A more dramatic re-ordering.

Testing

I wasn't able to reproduce the padding check failure locally even before this change. Not sure why, but this change seems like an improvement regardless.

Be sure to check the clang-tidy CI check before merging.

jbytheway added 2 commits May 4, 2020 19:17
One side-effect of the nested containers change was that clang-tidy
started reporting about excessive padding in itype.  The check was
temporarily disabled because we didn't want additional churn in that PR.

This re-enables that check and rearranges the fields in itype.  Mostly
just moving all the public members to the start of the class, which
allows two bool members to be adjacent where they previously weren't.
That ought to be enough to reduce the padding sufficiently.

I wasn't able to reproduce the padding check failure locally even before
this change.  Not sure why, but this change seems like an improvement
regardless.
@KorGgenT KorGgenT added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels May 4, 2020
@kevingranade kevingranade merged commit 781ca2e into CleverRaven:master May 5, 2020
@jbytheway jbytheway deleted the improve_itype_layout branch May 5, 2020 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants