[LLVMdev] lld coding style (original) (raw)

Sean Silva chisophugis at gmail.com
Thu Oct 9 17:51:29 PDT 2014


On Wed, Oct 8, 2014 at 10:59 AM, Manuel Klimek <klimek at google.com> wrote:

On Wed Oct 08 2014 at 7:25:29 PM Chandler Carruth <chandlerc at google.com> wrote: On Wed, Oct 8, 2014 at 10:23 AM, David Blaikie <dblaikie at gmail.com> wrote:

On Wed, Oct 8, 2014 at 10:16 AM, Chandler Carruth <chandlerc at google.com> wrote: On Wed, Oct 8, 2014 at 9:34 AM, Chris Lattner <clattner at apple.com> wrote: > On Oct 8, 2014, at 1:55 AM, Renato Golin <renato.golin at linaro.org> wrote: > > On 8 October 2014 05:25, Chris Lattner <clattner at apple.com> wrote: >>> Up until now the thread has been about “formatting”. You suggested renaming >>> every variable in the project! >> >> If that's what it takes. > > If we're still talking about applying it to the HEAD, not the whole > history, I think it's feasible. Yep, to be clear, I mean one big change to head, not trying to rewrite history.

I think rewriting history is kind of a hand-wavy pipe dream. ;] I'll believe it when I see it. For now, we should stick to what we know we could actually do, and changing head is the only realistic option there. FWIW - I don't think we even have that power (when it comes to global renaming) yet, do we? (rename everything in a project to match some naming convention) Behold the power of perl. More realistically, I think Manuel has cooked up some one-off tools specifically for renaming variables to match LLVM's conventions. Adding him. That tool was an early one-off that I used to port some code, but it was just enough to port that code. It shouldn't be too hard to code something up that works for lld (it would need to use clang-modernize's 2-phase code transformation stuff). cc'ing Alex & Benjamin, who afaik have thought a bit about how to get this stuff to work with clang-tidy. On a different note: My favorite feature of Phabricator: if you look at a file in blame mode, there are little "<<" next to the revision, which lets you jump to the file "past that revision". This lets one quickly browse to the right point for what one is looking for, making naming or formatting changes less burdensome. Example: http://reviews.llvm.org/diffusion/L/browse/cfe/trunk/include/clang/Basic/DiagnosticIDs.h;198376

That is really great! I need this from time to time and though it's not difficult to approximate on the command line, it is tedious. This saves a lot of work!

-- Sean Silva

Cheers, /Manuel


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/20141009/b1373fce/attachment.html>



More information about the llvm-dev mailing list