Clean up some warnings from running libc-lint for these folders.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Update .clang-tidy rules for local constant cases to accept both lower_case and
UPPER_CASE.
I've updated clang-tidy rules to accept both lower_case and UPPER_CASE for local constants.
libc/.clang-tidy | ||
---|---|---|
12 ↗ | (On Diff #505623) | Why is this (and two more below) changed? |
23 ↗ | (On Diff #505623) | I suppose that if you don't add these, then the VariableCase complains about UPPER_CASE names. But, once you add this LocalConstantCase, it complains about const function args also and so you have to add LocalConstantIgnoredRegexp? |
Simplify the LocalConstant rules a bit.
libc/.clang-tidy | ||
---|---|---|
12 ↗ | (On Diff #505623) | These will make the rule a bit stricter by preventing trailing _'s in the names. |
23 ↗ | (On Diff #505623) | I didn't look at VariableCase. I guess I could simplify this a bit by using LocalConstantIngoredRegexp to allow UPPER_CASE, and using VariableCase for lower_case. |
libc/.clang-tidy | ||
---|---|---|
23 ↗ | (On Diff #505623) | We already have VariableCase above on line 13, no? |
libc/.clang-tidy | ||
---|---|---|
23 ↗ | (On Diff #505623) | Yes, that's why I removed LocalConstantCase and changed LocalConstantIgnoredRegexp to allow UPPER_CASE instead. |
libc/.clang-tidy | ||
---|---|---|
23 ↗ | (On Diff #505623) | Ah, you mean't you did not "notice" VariableCase. |