Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit e8c2d27

Browse files
[clang-format] [PR36858] Add missing .hh and .cs extensions from python support utilities
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
1 parent 2e23d71 commit e8c2d27

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def main():
4343
help='custom pattern selecting file paths to reformat '
4444
'(case sensitive, overrides -iregex)')
4545
parser.add_argument('-iregex', metavar='PATTERN', default=
46-
r'.*\.(cpp|cc|c\+\+|cxx|c|cl|h|hpp|m|mm|inc|js|ts|proto'
47-
r'|protodevel|java)',
46+
r'.*\.(cpp|cc|c\+\+|cxx|c|cl|h|hh|hpp|m|mm|inc|js|ts|proto'
47+
r'|protodevel|java|cs)',
4848
help='custom pattern selecting file paths to reformat '
4949
'(case insensitive, overridden by -regex)')
5050
parser.add_argument('-sort-includes', action='store_true', default=False,

tools/clang-format/git-clang-format

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,14 @@ def main():
7777
'c', 'h', # C
7878
'm', # ObjC
7979
'mm', # ObjC++
80-
'cc', 'cp', 'cpp', 'c++', 'cxx', 'hpp', 'hxx', # C++
80+
'cc', 'cp', 'cpp', 'c++', 'cxx', 'hh', 'hpp', 'hxx', # C++
8181
'cu', # CUDA
8282
# Other languages that clang-format supports
8383
'proto', 'protodevel', # Protocol Buffers
8484
'java', # Java
8585
'js', # JavaScript
8686
'ts', # TypeScript
87+
'cs', # C Sharp
8788
])
8889

8990
p = argparse.ArgumentParser(

0 commit comments

Comments
 (0)