]> granicus.if.org Git - clang/commitdiff
[clang-format] [PR36858] Add missing .hh and .cs extensions from python support utilities
authorPaul Hoad <mydeveloperday@gmail.com>
Tue, 24 Sep 2019 14:00:06 +0000 (14:00 +0000)
committerPaul Hoad <mydeveloperday@gmail.com>
Tue, 24 Sep 2019 14:00:06 +0000 (14:00 +0000)
Summary: https://bugs.llvm.org/show_bug.cgi?id=36858 identifies .hh as a missing C++ header extension file while making this change I realized there was no support for .cs files which were added recently

Reviewers: pseyfert, klimek, owenpan

Reviewed By: klimek

Subscribers: cfe-commits

Tags: #clang-tools-extra, #clang

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372760 91177308-0d34-0410-b5e6-96231b3b80d8

tools/clang-format/clang-format-diff.py
tools/clang-format/git-clang-format

index a4f22ca02936654d4505a0bea65a0524a2ccc303..122db49ff73c764f2cb89f774d74b14344b84c1d 100755 (executable)
@@ -43,8 +43,8 @@ def main():
                       help='custom pattern selecting file paths to reformat '
                       '(case sensitive, overrides -iregex)')
   parser.add_argument('-iregex', metavar='PATTERN', default=
-                      r'.*\.(cpp|cc|c\+\+|cxx|c|cl|h|hpp|m|mm|inc|js|ts|proto'
-                      r'|protodevel|java)',
+                      r'.*\.(cpp|cc|c\+\+|cxx|c|cl|h|hh|hpp|m|mm|inc|js|ts|proto'
+                      r'|protodevel|java|cs)',
                       help='custom pattern selecting file paths to reformat '
                       '(case insensitive, overridden by -regex)')
   parser.add_argument('-sort-includes', action='store_true', default=False,
index ef7f22d0f873e005d9898c59f504e9e30e7c26bc..bf05d9143fa18da8f352e3f64df4291057e47603 100755 (executable)
@@ -77,13 +77,14 @@ def main():
       'c', 'h',  # C
       'm',  # ObjC
       'mm',  # ObjC++
-      'cc', 'cp', 'cpp', 'c++', 'cxx', 'hpp', 'hxx',  # C++
+      'cc', 'cp', 'cpp', 'c++', 'cxx', 'hh', 'hpp', 'hxx',  # C++
       'cu',  # CUDA
       # Other languages that clang-format supports
       'proto', 'protodevel',  # Protocol Buffers
       'java',  # Java
       'js',  # JavaScript
       'ts',  # TypeScript
+      'cs',  # C Sharp
       ])
 
   p = argparse.ArgumentParser(