[LLVMdev] Coding standard - indentation width

Sebastian Redl sebastian.redl at getdesigned.at
Wed Feb 29 03:07:15 PST 2012


On 29.02.2012, at 11:26, James Molloy wrote:

> Hi,
>  
> The coding standard document doesn’t mention anything about preferred indentation width (only not to change per-file and not make massive re-tabbing diffs), but I swear I’ve had people complain at me for not using 2 spaces in new files I’ve committed.
>  
> Am I misremembering, or is there a preferred tabwidth of 2, and if so where is it / should it be documented?

It's not documented, but probably every single existing file uses it, so it would be a headache for single files to start out differently. The question here is whether a few new files are "a significant body of source".
If you add an entire subproject, that would be a different thing. (E.g. I'm not sure what convention libc++ follows, but I wouldn't be surprised if it was different from LLVM/Clang.)

Sebastian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120229/eaf97e15/attachment.html>


More information about the llvm-dev mailing list