Renato Golin via llvm-dev
2017-Jan-09 15:15 UTC
[llvm-dev] [cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
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 overrideI thought we had all of those already...> The last point is to get to consensus with > > push_back({first, second}) > or > emplace_back(first ,second);I second Chandler's opinion on this. cheers, --renato
Piotr Padlewski via llvm-dev
2017-Jan-09 15:25 UTC
[llvm-dev] [cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
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 point is to get to consensus with > > > > push_back({first, second}) > > or > > emplace_back(first ,second); > > I second Chandler's opinion on this. >2:1 for push_back. From commits I also see that most of the people prefer push_back, but I will wait a little bit with the verdict.> > cheers, > --renato >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170109/ab1d7550/attachment.html>
Reid Kleckner via llvm-dev
2017-Jan-09 18:20 UTC
[llvm-dev] [cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
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. I object to the first. If you need a new type name, use a typedef. It's time honored and everyone, including C programmers, will know what you're doing. I don't understand why people push the new thing just for the sake of new-ness. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170109/eb3d1ebc/attachment.html>