Skip to content

Commit 378d240

Browse files
authored
[clang-tidy] Remove addition of emacs tag in checks headers (#153942)
After #118553, emacs tag is no longer needed in LLVM files: https://llvm.org/docs/CodingStandards.html#file-headers. This patch removes it from `add_new_check.py` lowering complexity we need to maintain.
1 parent 7e99893 commit 378d240

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

clang-tools-extra/clang-tidy/add_new_check.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,9 @@ def write_header(
8989
+ check_name_camel.upper()
9090
+ "_H"
9191
)
92-
f.write("//===--- ")
93-
f.write(os.path.basename(filename))
94-
f.write(" - clang-tidy ")
95-
f.write("-" * max(0, 42 - len(os.path.basename(filename))))
96-
f.write("*- C++ -*-===//")
9792
f.write(
9893
"""
94+
//===----------------------------------------------------------------------===//
9995
//
10096
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
10197
// See https://llvm.org/LICENSE.txt for license information.
@@ -145,13 +141,9 @@ def write_implementation(
145141
filename = os.path.join(module_path, check_name_camel) + ".cpp"
146142
print("Creating %s..." % filename)
147143
with io.open(filename, "w", encoding="utf8", newline="\n") as f:
148-
f.write("//===--- ")
149-
f.write(os.path.basename(filename))
150-
f.write(" - clang-tidy ")
151-
f.write("-" * max(0, 51 - len(os.path.basename(filename))))
152-
f.write("-===//")
153144
f.write(
154145
"""
146+
//===----------------------------------------------------------------------===//
155147
//
156148
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
157149
// See https://llvm.org/LICENSE.txt for license information.

0 commit comments

Comments
 (0)