[libc-commits] [libc] [libc] start fix readability-identifier-naming lints (PR #83342)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Wed Feb 28 14:00:29 PST 2024


nickdesaulniers wrote:

> > Otherwise, if we don't update the clang-tidy rules (and instead have constexpr functions be lowercase, the current number of unique lints here is 11.
> > So by that measure, I think that it makes sense to:
> > 
> > 1. codify that we use lower_case for constexpr functions.
> > 2. fix the 11 violations
> > 
> > Rather then codify it as upper case and fix the 170 resulting violations.
> 
> How about option 3: mark these functions `consteval` and add C++20 standard when needed? Or add TODO's for option 3?

Personally, I'm happy to aggressively move to newer language standards; `consteval` in particular seems to provide much stronger guarantees than `constexpr` IIUC.

Pragmatically, I don't think we should be moving our implementation to a standard newer than what the rest of the llvm-project requires.  We'd probably be dropping support for certain host compiler versions by requiring newer standard support, and we'd need to research that.

Moving to C++20 will be a larger yak shave than fixing 11 clang-tidy lints.

https://github.com/llvm/llvm-project/pull/83342


More information about the libc-commits mailing list