[cfe-dev] Should we fix Bug-43106

Anders Jensen via cfe-dev cfe-dev at lists.llvm.org
Sun Mar 29 07:52:18 PDT 2020


Hi

I am a happy user of various LLVM tools, but this is my first attempt to
contribute to the project.

Does anyone know about the progress on BUG-43106.
https://bugs.llvm.org/show_bug.cgi?id=43106
In summery this ask for a clang-tidy check to enforce leading capital
letter with snake case for user defined types and concepts.

I have attached a possible extension to the readability-identifier-naming
checker in clang-tidy.
I have checked the patch in windows building with MSVC by running
check_clang_tidy.py on the readability-identifier-naming.cpp file.

This results in the expected change on the union type definition:
...
-  union __MyUnion_is_wonderful__ {};
+  union UMy_union_is_wonderful {};
...
I do not have strong opinions about what to call the option. I followed
what was asked for in the ticket, but perhaps we should discuss what to
call the option some more. I follow the consistency argument made in the
description of  BUG-43106:
"
Let's call it "Camel_lower_case" for the purposes of this description. This
is to match the existing "Camel_Snake_Case" and "lower_case".
"
But there are other options like "Upper_snake_case", so I encourage a
discussion on this.

Could you provide some guidance on how to progress towards getting this
checked in to the LLVM project?

Thank you for your effort and time.

Best regards,
Anders Jensen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200329/bc96672d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Bug-43106-Add-Upper-snake-case-option-to-clang-tidy.patch
Type: application/octet-stream
Size: 4363 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200329/bc96672d/attachment-0001.obj>


More information about the cfe-dev mailing list