<div dir="ltr">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.<div>
<br></div><div>-- Sean Silva<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 7, 2014 at 3:18 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@gmail.com" target="_blank">chandlerc@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Tue, Jan 7, 2014 at 4:16 PM, Cody Maloney <span dir="ltr"><<a href="mailto:cmaloney@theoreticalchaos.com" target="_blank">cmaloney@theoreticalchaos.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Just one looks actually broken / incorrect:<div><div><a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/Modularize.cpp?rev=198703&r1=198702&r2=198703&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/Modularize.cpp?rev=198703&r1=198702&r2=198703&view=diff</a></div>



</div><div><br></div><div>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)</div>

</div></blockquote></div><br></div></div>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.</div>

</div>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div></div></div>