This patch applies the lint rules described in the previous patch. There
was also a significant amount of effort put into manually fixing things,
since all of the templated functions, or structs defined in /spec, were
not updated and had to be handled manually.
Details
- Reviewers
sivachandra lntue gchatelet - Commits
- rG1c92911e9e1d: [libc] apply new lint rules
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
In general looks good. Please ping after updating the commit message and fixing the broken tests.
libc/src/__support/CPP/TypeTraits.h | ||
---|---|---|
34 ↗ | (On Diff #388670) | We should have a consistent style. So, I am inclined towards IS_SAME_V and fix the other constants/constexpr values to follow this style. |
libc/src/__support/detailed_powers_of_ten.h | ||
34 | Yes, for consistency. |
rebase and a bit more clean up.
I also looked into the sigaction failure, and it appears to be caused by raise(SIGUSR1) segfaulting, although I'm not sure why.
libc/src/__support/detailed_powers_of_ten.h | ||
---|---|---|
34 | I changed it to constexpr so that the lint rules would make it caps |
Quick comments after glancing at the change
libc/src/__support/CPP/TypeTraits.h | ||
---|---|---|
46–53 ↗ | (On Diff #390864) | Uppercase template member fields is very counter intuitive. I don't think I've seen this in any of the llvm projects. |
libc/src/string/memmove.cpp | ||
43 | This memmove implementation is stale (it's been updated) |
fix some formatting changes that were unnecessary (specifically reverting struct tm -> struct Tm and the TypeTraits.h changes)
libc/src/string/memory_utils/elements.h | ||
---|---|---|
89 | Actually, now that it's uppercased there's no need for the K_, it could just be SIZE. | |
libc/src/string/memory_utils/memcpy_implementations.h | ||
49 | Same here in this file, no need for the K_. |
Fix specific requested variables
libc/src/math/generic/sincosf_data.cpp | ||
---|---|---|
18 | I solved this by adding an exception for variables starting with underscores, so if you want to have a variable with any case you want, it just has to start with an underscore. |
Accepting now. With a change this large, I am sure some of the corners will go in unpolished. We can fix them up as we notice in follow up patches. As long as we have the correct clang-tidy rules checked in, we are good to go.
clang-format: please reformat the code