[libc-commits] [PATCH] D146048: [libc][NFC] Clean up clang-tidy warnings for `src/__support` and `src/math`.

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Mar 15 15:17:15 PDT 2023


lntue added inline comments.


================
Comment at: libc/.clang-tidy:12
   - key:             readability-identifier-naming.MemberIgnoredRegexp
-    value:           "^_[A-Za-z0-9_]+$"
+    value:           "_?(_[A-Za-z0-9]+)*"
   - key:             readability-identifier-naming.VariableCase
----------------
sivachandra wrote:
> Why is this (and two more below) changed?
These will make the rule a bit stricter by preventing trailing `_`'s in the names.


================
Comment at: libc/.clang-tidy:23
     value:           UPPER_CASE
+  - key:             readability-identifier-naming.LocalConstantCase
+    value:           UPPER_CASE
----------------
sivachandra wrote:
> 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`?
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`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146048/new/

https://reviews.llvm.org/D146048



More information about the libc-commits mailing list