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

Ismail Donmez via cfe-dev cfe-dev at lists.llvm.org
Fri Mar 11 01:17:32 PST 2016


On Fri, Mar 11, 2016 at 11:14 AM, Chandler Carruth via cfe-dev
<cfe-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.

Should take care of windows headers, part of DIASupport.h:

// atlbase.h has to come before windows.h
#include <atlbase.h>
#include <windows.h>

// DIA headers must come after windows headers.
                                                   #include
<cvconst.h>
#include <dia2.h>

Sorting those would break stuff.


More information about the cfe-dev mailing list