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 | 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 |
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.
If we are going to change these, I feel like changing to match std::is_same_v style for these templates would be more beneficial.