[clang-format] Recognize "hxx" as a C++ header in clang-format-diff.py
authorMiklos Vajna <vmiklos@vmiklos.hu>
Fri, 18 Sep 2020 19:42:38 +0000 (21:42 +0200)
committerMiklos Vajna <vmiklos@vmiklos.hu>
Fri, 18 Sep 2020 19:43:18 +0000 (21:43 +0200)
And shift "proto" to the next line to avoid a too long line.

Reviewed By: MyDeveloperDay

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

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

index c5331202fc1bdafb08f2b962cab1cbac343c2fd4..6e653a1342896371f659ba3d6ee61d846956f072 100755 (executable)
@@ -47,8 +47,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|hh|hpp|m|mm|inc|js|ts|proto'
-                      r'|protodevel|java|cs)',
+                      r'.*\.(cpp|cc|c\+\+|cxx|c|cl|h|hh|hpp|hxx|m|mm|inc|js|ts'
+                      r'|proto|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,