[llvm-dev] [cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
Piotr Padlewski via llvm-dev
llvm-dev at lists.llvm.org
Mon Jan 9 10:40:19 PST 2017
2017-01-09 19:20 GMT+01:00 Reid Kleckner <rnk at google.com>:
> On Mon, Jan 9, 2017 at 7:25 AM, Piotr Padlewski via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> 2017-01-09 16:15 GMT+01:00 Renato Golin <renato.golin at linaro.org>:
>>
>>> On 9 January 2017 at 14:17, Piotr Padlewski via cfe-dev
>>> <cfe-dev at lists.llvm.org> wrote:
>>> > - prefer "using' instead of "typedef"
>>> > - use default member initialization
>>> > - use default, override, delete
>>> > - skip "virtual" with override
>>>
>>> I thought we had all of those already...
>>>
>>> Nope, some people use it, but I still see a lot of new code with
>> typedefs.
>> I would like to have it written in style guide so it will be easier to
>> convince to change in review.
>>
>
> The last two are enforced by compiler warnings now. The second is hard
> because of bitfields.
>
Clang is smart enough to propose using override, but only if it see that it
was used somewhere, so it is not totally enforced. Also I don't think it
warns about redundant "virtual" if one writes "virtual void foo() override".
Yes, the bitfields is the only one reason we would need initializations in
constructors in some places, but it is rare (as far as what clang-tidy
check have found)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170109/c9e97d17/attachment.html>
More information about the llvm-dev
mailing list