It is unfortunate that we are using a different coding scheme for LLD than LLVM, but I'm leaning toward the view that switching to LLVM style will cost too much if it means we are going to lose virtually all commit history. A patch to switch to LLVM style would rename all local and member variables, so it would touch all the lines. Diff is not powerful enough to trace the history beyond variable renaming. svn blame would become useless. I have no strong opinion on this. If many other LLD developers really want to make this happen, I can bear with that. It doesn't feel very productive thing to do to me, though. On Sun, Oct 5, 2014 at 2:26 PM, Tim Northover <t.p.northover at gmail.com> wrote:> > So with that in mind, I would like to ask, would it be possible to > consider > > switching to LLVM style for lld? > > One particular feature of lld's current style is particularly dodgy: > starting member variables with '_' makes undefined behaviour very easy > to introduce (if the first real char is upper case; there's already > plenty of examples). > > It's one of the more innocuous forms of UB, but still bad form for an > LLVM project. If even we can't get it right... > > Cheers. > > Tim. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141006/85b5f65b/attachment.html>
On Mon, Oct 6, 2014 at 12:54 PM, Rui Ueyama <ruiu at google.com> wrote:> It is unfortunate that we are using a different coding scheme for LLD than > LLVM, but I'm leaning toward the view that switching to LLVM style will > cost too much if it means we are going to lose virtually all commit > history. A patch to switch to LLVM style would rename all local and member > variables, so it would touch all the lines. Diff is not powerful enough to > trace the history beyond variable renaming. svn blame would become useless. > >You can have svn/git ignore whitespace changes for blame FWIW. I don't know how this will work for general reformatting though :\ Do you have a feel? -eric> I have no strong opinion on this. If many other LLD developers really want > to make this happen, I can bear with that. It doesn't feel very productive > thing to do to me, though. > > On Sun, Oct 5, 2014 at 2:26 PM, Tim Northover <t.p.northover at gmail.com> > wrote: > >> > So with that in mind, I would like to ask, would it be possible to >> consider >> > switching to LLVM style for lld? >> >> One particular feature of lld's current style is particularly dodgy: >> starting member variables with '_' makes undefined behaviour very easy >> to introduce (if the first real char is upper case; there's already >> plenty of examples). >> >> It's one of the more innocuous forms of UB, but still bad form for an >> LLVM project. If even we can't get it right... >> >> Cheers. >> >> Tim. >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141006/56b7ab9d/attachment.html>
On Mon, Oct 6, 2014 at 2:47 PM, Eric Christopher <echristo at google.com> wrote:> > > On Mon, Oct 6, 2014 at 12:54 PM, Rui Ueyama <ruiu at google.com> wrote: > >> It is unfortunate that we are using a different coding scheme for LLD >> than LLVM, but I'm leaning toward the view that switching to LLVM style >> will cost too much if it means we are going to lose virtually all commit >> history. A patch to switch to LLVM style would rename all local and member >> variables, so it would touch all the lines. Diff is not powerful enough to >> trace the history beyond variable renaming. svn blame would become useless. >> >> > You can have svn/git ignore whitespace changes for blame FWIW. I don't > know how this will work for general reformatting though :\ > > Do you have a feel? >I don't think there's an option to make git/svn-diff to ignore case change and leading underscore removal. Is there? Ideally maybe we should write a better diff tool that can ignore variable renaming. Because we can make clang-rename, it's doable at least.>-eric> > >> I have no strong opinion on this. If many other LLD developers really >> want to make this happen, I can bear with that. It doesn't feel very >> productive thing to do to me, though. >> >> On Sun, Oct 5, 2014 at 2:26 PM, Tim Northover <t.p.northover at gmail.com> >> wrote: >> >>> > So with that in mind, I would like to ask, would it be possible to >>> consider >>> > switching to LLVM style for lld? >>> >>> One particular feature of lld's current style is particularly dodgy: >>> starting member variables with '_' makes undefined behaviour very easy >>> to introduce (if the first real char is upper case; there's already >>> plenty of examples). >>> >>> It's one of the more innocuous forms of UB, but still bad form for an >>> LLVM project. If even we can't get it right... >>> >>> Cheers. >>> >>> Tim. >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141006/b6b91c63/attachment.html>
On Tue, Oct 7, 2014 at 8:54 AM, Rui Ueyama <ruiu at google.com> wrote:> would touch all the lines. Diff is not powerful enough to trace the > history beyond variable renaming. svn blame would become useless. >"useless" is much too strong a description. If svn blame points to the reformat commit, then simply re-run the blame on the commit before the reformat. If total reformats are frequent then this is impractical. If they happen once in five years then it's not really a big deal. Wrapper scripts can even be pretty easily written to do this automatically. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141007/131022ff/attachment.html>
Looks like most people in this thread support using LLVM style in LLD. I also had an offline discussion and many people wanted to have one coding style in all LLVM projects. So I'm convinced that we should do that. I'm going to create a patch to rename all variables if no one objects. On Mon, Oct 6, 2014 at 3:10 PM, Bruce Hoult <bruce at hoult.org> wrote:> On Tue, Oct 7, 2014 at 8:54 AM, Rui Ueyama <ruiu at google.com> wrote: > >> would touch all the lines. Diff is not powerful enough to trace the >> history beyond variable renaming. svn blame would become useless. >> > > "useless" is much too strong a description. > > If svn blame points to the reformat commit, then simply re-run the blame > on the commit before the reformat. > > If total reformats are frequent then this is impractical. If they happen > once in five years then it's not really a big deal. Wrapper scripts can > even be pretty easily written to do this automatically. > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141006/7753943b/attachment.html>