[PATCH] D33932: [clang-format] Add support for case-insensitive header matching and use it to improve support for LLVM-style include sorting.

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 12 08:30:33 PDT 2017

On Tue, Jun 6, 2017 at 3:56 AM Chandler Carruth via Phabricator via
cfe-commits <cfe-commits at lists.llvm.org> wrote:

> chandlerc created this revision.
> Herald added subscribers: mcrosier, sanjoy, klimek.
> This really is a collection of improvements to the rules for LLVM
> include sorting:
> - We have gmock headers now, so it adds support for those to one of the
> categories.
> - LLVM does use 'FooTest.cpp' files to test 'Foo.h' so it adds that suffix
> for finding a main header.
> - At times the test file's case may not match the header file's case, so
> adds support for case-insensitive regex matching of these things.

Curious - where does this last one come up? Can we fix those, or do they
look good/intentional/worth keeping?

> With this set of changes, I can't spot any misbehaviors when re-sorting
> all of LLVM's unittest '#include' lines.
> Note that I don't know the first thing about testing clang-format, so
> please
> feel free to tell me what all I need to be doing here.
> https://reviews.llvm.org/D33932
> Files:
>   include/clang/Format/Format.h
>   lib/Format/Format.cpp
>   unittests/Format/SortIncludesTest.cpp
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170612/071276d8/attachment.html>

More information about the cfe-commits mailing list