[clang] 305a4ab - [clang-format] [PR45126] Help text is missing all available formats

via cfe-commits cfe-commits at lists.llvm.org
Thu May 7 11:50:58 PDT 2020


Author: mydeveloperday
Date: 2020-05-07T19:50:21+01:00
New Revision: 305a4abfd3a1e3f4e5c8d98136f88f54b761b011

URL: https://github.com/llvm/llvm-project/commit/305a4abfd3a1e3f4e5c8d98136f88f54b761b011
DIFF: https://github.com/llvm/llvm-project/commit/305a4abfd3a1e3f4e5c8d98136f88f54b761b011.diff

LOG: [clang-format] [PR45126] Help text is missing all available formats

Summary:
https://bugs.llvm.org/show_bug.cgi?id=45126

GNU and Microsoft styles are built in supported styles but are not displayed in the help text

Reviewed By: sammccall

Subscribers: cfe-commits

Tags: #clang, #clang-format

Differential Revision: https://reviews.llvm.org/D79372

Added: 
    

Modified: 
    clang/lib/Format/Format.cpp
    clang/tools/clang-format/clang-format-diff.py

Removed: 
    


################################################################################
diff  --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 1fd7d613f9fb..655df7e45ba7 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -2644,7 +2644,7 @@ LangOptions getFormattingLangOpts(const FormatStyle &Style) {
 
 const char *StyleOptionHelpDescription =
     "Coding style, currently supports:\n"
-    "  LLVM, Google, Chromium, Mozilla, WebKit.\n"
+    "  LLVM, GNU, Google, Chromium, Microsoft, Mozilla, WebKit.\n"
     "Use -style=file to load style configuration from\n"
     ".clang-format file located in one of the parent\n"
     "directories of the source file (or current\n"

diff  --git a/clang/tools/clang-format/clang-format-
diff .py b/clang/tools/clang-format/clang-format-
diff .py
index 5977ab056515..c5331202fc1b 100755
--- a/clang/tools/clang-format/clang-format-
diff .py
+++ b/clang/tools/clang-format/clang-format-
diff .py
@@ -56,8 +56,8 @@ def main():
   parser.add_argument('-v', '--verbose', action='store_true',
                       help='be more verbose, ineffective without -i')
   parser.add_argument('-style',
-                      help='formatting style to apply (LLVM, Google, Chromium, '
-                      'Mozilla, WebKit)')
+                      help='formatting style to apply (LLVM, GNU, Google, Chromium, '
+                      'Microsoft, Mozilla, WebKit)')
   parser.add_argument('-binary', default='clang-format',
                       help='location of binary to use for clang-format')
   args = parser.parse_args()


        


More information about the cfe-commits mailing list