Seems that now that clang-tidy is up and running this include ordering
would make sense to have in there? It would even be easy to check which
included header is the main module header by checking if it contains
declarations for the stuff in the .cpp file.

-- Sean Silva


On Tue, Jan 7, 2014 at 3:18 PM, Chandler Carruth <[email protected]>wrote:

>
> On Tue, Jan 7, 2014 at 4:16 PM, Cody Maloney <
> [email protected]> wrote:
>
>> Just one looks actually broken / incorrect:
>>
>> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/Modularize.cpp?rev=198703&r1=198702&r2=198703&view=diff
>>
>> It looks like the API header search in sort_includes.py is
>> broken/incorrect in this case. It assumes the first include in any 'cpp'
>> file is correct even if it does not match name or section at all. The
>> script should probably search for a matching name in the last chunk of the
>> path (Although one header with multiple implementing independently named
>> cpp files would break it then)
>>
>
> I'll fix this by hand, but I'm not going to add that much complexity to
> sort_includes.py. =] The goal was to let me update the name of headers and
> re-sort everything easily, and trusting the first one works for any cpp
> file that doesn't have the wrong thing at the top. Patches always welcome
> of course.
>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to