[PATCH] D80309: [clang-format][docfix] Update predefined styles in docs

Jake Merdich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 20 09:48:52 PDT 2020


JakeMerdichAMD created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
JakeMerdichAMD added reviewers: MyDeveloperDay, krasimir, mitchell-stellar, sammccall.
JakeMerdichAMD added a project: clang-format.

The predefined styles that clang-format supports are listed in two
places, and neither is up-to-date. GNU style isn't mentioned at all!


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80309

Files:
  clang/docs/ClangFormatStyleOptions.rst
  clang/docs/LibFormat.rst


Index: clang/docs/LibFormat.rst
===================================================================
--- clang/docs/LibFormat.rst
+++ clang/docs/LibFormat.rst
@@ -40,7 +40,7 @@
 
 The style options describe specific formatting options that can be used in
 order to make `ClangFormat` comply with different style guides. Currently,
-two style guides are hard-coded:
+several style guides are hard-coded:
 
 .. code-block:: c++
 
@@ -52,6 +52,26 @@
   /// http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml.
   FormatStyle getGoogleStyle();
 
+  /// Returns a format style complying with Chromium's style guide:
+  /// https://chromium.googlesource.com/chromium/src/+/master/styleguide/styleguide.md
+  FormatStyle getChromiumStyle();
+
+  /// Returns a format style complying with the GNU coding standards:
+  /// https://www.gnu.org/prep/standards/standards.html
+  FormatStyle getGNUStyle();
+
+  /// Returns a format style complying with Mozilla's style guide
+  /// https://firefox-source-docs.mozilla.org/code-quality/coding-style/index.html
+  FormatStyle getMozillaStyle();
+
+  /// Returns a format style complying with Webkit's style guide:
+  /// https://webkit.org/code-style-guidelines/
+  FormatStyle getWebkitStyle();
+
+  /// Returns a format style complying with Microsoft's style guide:
+  /// https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
+  FormatStyle getMicrosoftStyle();
+
 These options are also exposed in the :doc:`standalone tools <ClangFormat>`
 through the `-style` option.
 
Index: clang/docs/ClangFormatStyleOptions.rst
===================================================================
--- clang/docs/ClangFormatStyleOptions.rst
+++ clang/docs/ClangFormatStyleOptions.rst
@@ -151,6 +151,9 @@
   * ``Microsoft``
     A style complying with `Microsoft's style guide
     <https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference?view=vs-2017>`_
+  * ``GNU``
+    A style complying with the `GNU coding standards
+    <https://www.gnu.org/prep/standards/standards.html>`_
 
 .. START_FORMAT_STYLE_OPTIONS
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80309.265277.patch
Type: text/x-patch
Size: 2129 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200520/2c3e4bff/attachment-0001.bin>


More information about the cfe-commits mailing list