[cfe-dev] [llvm-dev] Any objections to re-sorting #include lines with clang-format/clang-tidy?

Chris Lattner via cfe-dev cfe-dev at lists.llvm.org
Fri Mar 11 17:02:04 PST 2016


> On Mar 11, 2016, at 1:14 AM, Chandler Carruth via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> The crazy clang-format folks have taught it to sort includes, and clang-tidy has a nice way to run it across all of LLVM and Clang.
> 
> Before I just submit the fixes (and any bug reports to the clang-format folks if it sorts things weirdly) I wanted to double check that folks would be ok with this. My understanding is that the sorting should match the LLVM conventions, but if not, I'll make sure to get that fixed first.

Does it do it the “right” way?  I think it is important for a .cpp file to include its corresponding header first (to ensure it stays self contained).

-Chris



More information about the cfe-dev mailing list