[PATCH] D48827: [clang-format ]Extend IncludeCategories regex documentation

Wim Leflere via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 2 04:36:33 PDT 2018

WimLeflere created this revision.
WimLeflere added reviewers: krasimir, Typz.
Herald added a subscriber: cfe-commits.

Extend the Clang-Format IncludeCategories documentation by adding a link to the supported regular expression standard (POSIX).
And extenting the example with a system header regex.
bug 35041 <https://bugs.llvm.org/show_bug.cgi?id=35041>

  rC Clang



Index: docs/ClangFormatStyleOptions.rst
--- docs/ClangFormatStyleOptions.rst
+++ docs/ClangFormatStyleOptions.rst
@@ -1279,6 +1279,10 @@
 **IncludeCategories** (``std::vector<IncludeCategory>``)
   Regular expressions denoting the different ``#include`` categories
   used for ordering ``#includes``.
+  `POSIX extended
+  <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html>`_
+  regular expressions are supported.
   These regular expressions are matched against the filename of an include
   (including the <> or "") in order. The value belonging to the first
@@ -1302,6 +1306,8 @@
         Priority:        2
       - Regex:           '^(<|"(gtest|gmock|isl|json)/)'
         Priority:        3
+      - Regex:           '<[[:alnum:].]+>'
+        Priority:        4
       - Regex:           '.*'
         Priority:        1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48827.153695.patch
Type: text/x-patch
Size: 927 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180702/f422b9ee/attachment.bin>

More information about the cfe-commits mailing list