-
Notifications
You must be signed in to change notification settings - Fork 75
Avoid TU-local entities #413
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
base: stable
Are you sure you want to change the base?
Conversation
#285 (comment) suggests that the code was never formatted with clang-format although there are some clang-format comments in the code. Let me just drop the last commit. |
Signed-off-by: Daniel Arndt <arndtd@ornl.gov>
ed05b2c
to
0f59886
Compare
yeah at some point we need to run the repo through clang-format and add a check to enforce it |
I'm happy to open a pull request if you're fine with doing it now. |
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.
A couple of minor suggestions
That would be really helpful if you have the time! |
Co-authored-by: Nicolas Morales <nmmoral@sandia.gov>
Related to kokkos/kokkos#8117. While trying to build a C++20 module for Kokkos with g++-15, I ran into a couple of instances where TU-local entities (https://en.cppreference.com/w/cpp/language/tu_local.html, https://eel.is/c++draft/basic.link#14) are exposed. This pull request tries to fix those I was able to address.
Note that clang++ is much more lenient with TU-local entities as decribed at https://clang.llvm.org/docs/StandardCPlusPlusModules.html#using-tu-local-entity-in-other-units.
inline
.compute_s_static_layout_left
andcompute_s_static_layout_right
were considered TU-local but converting those structs to functions seems be an improvement (since it's more concise) anyway.It's not quite clear to me which clang-format version was used for these files before so I kept the indentation fixes with clang-16 in a separate commit.