Skip to content

Commit 825cec2

Browse files
committed
[clang-format] Add Verilog suffixes to the scripts
I decided not to wait for D149088 because it was taking a long time. The capture group in the regexp was changed to non-capturing. It doesn't need to be captured. Reviewed By: HazardyKnusperkeks, owenpan Differential Revision: https://reviews.llvm.org/D154467
1 parent b65ce4e commit 825cec2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ def main():
6161
parser.add_argument(
6262
"-iregex",
6363
metavar="PATTERN",
64-
default=r".*\.(cpp|cc|c\+\+|cxx|cppm|ccm|cxxm|c\+\+m|c|cl|h|hh|hpp|hxx"
65-
r"|m|mm|inc|js|ts|proto|protodevel|java|cs|json)",
64+
default=r".*\.(?:cpp|cc|c\+\+|cxx|cppm|ccm|cxxm|c\+\+m|c|cl|h|hh|hpp"
65+
r"|hxx|m|mm|inc|js|ts|proto|protodevel|java|cs|json|s?vh?)",
6666
help="custom pattern selecting file paths to reformat "
6767
"(case insensitive, overridden by -regex)",
6868
)

clang/tools/clang-format/git-clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def main():
9898
'ts', # TypeScript
9999
'cs', # C Sharp
100100
'json', # Json
101+
'sv', 'svh', 'v', 'vh', # Verilog
101102
])
102103

103104
p = argparse.ArgumentParser(

0 commit comments

Comments
 (0)