[clang-tools-extra] 378d240 - [clang-tidy] Remove addition of emacs tag in checks headers (#153942)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 18 12:49:58 PDT 2025
Author: Baranov Victor
Date: 2025-08-18T22:49:54+03:00
New Revision: 378d2401251f53a8abb8a9757536bae2d000bc77
URL: https://github.com/llvm/llvm-project/commit/378d2401251f53a8abb8a9757536bae2d000bc77
DIFF: https://github.com/llvm/llvm-project/commit/378d2401251f53a8abb8a9757536bae2d000bc77.diff
LOG: [clang-tidy] Remove addition of emacs tag in checks headers (#153942)
After https://github.com/llvm/llvm-project/pull/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.
Added:
Modified:
clang-tools-extra/clang-tidy/add_new_check.py
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-tidy/add_new_check.py b/clang-tools-extra/clang-tidy/add_new_check.py
index e366f10053535..2b51a1dc40ebc 100755
--- a/clang-tools-extra/clang-tidy/add_new_check.py
+++ b/clang-tools-extra/clang-tidy/add_new_check.py
@@ -89,13 +89,9 @@ def write_header(
+ check_name_camel.upper()
+ "_H"
)
- f.write("//===--- ")
- f.write(os.path.basename(filename))
- f.write(" - clang-tidy ")
- f.write("-" * max(0, 42 - len(os.path.basename(filename))))
- f.write("*- C++ -*-===//")
f.write(
"""
+//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -145,13 +141,9 @@ def write_implementation(
filename = os.path.join(module_path, check_name_camel) + ".cpp"
print("Creating %s..." % filename)
with io.open(filename, "w", encoding="utf8", newline="\n") as f:
- f.write("//===--- ")
- f.write(os.path.basename(filename))
- f.write(" - clang-tidy ")
- f.write("-" * max(0, 51 - len(os.path.basename(filename))))
- f.write("-===//")
f.write(
"""
+//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
More information about the cfe-commits
mailing list