[clang-tools-extra] 6884cc7 - [clang-tidy][NFC] let multi-line string first line does not wrap (#160019)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 22 03:33:35 PDT 2025
Author: Congcong Cai
Date: 2025-09-22T18:33:31+08:00
New Revision: 6884cc7e77631a73a151bcd9be69a75e4edb5fcb
URL: https://github.com/llvm/llvm-project/commit/6884cc7e77631a73a151bcd9be69a75e4edb5fcb
DIFF: https://github.com/llvm/llvm-project/commit/6884cc7e77631a73a151bcd9be69a75e4edb5fcb.diff
LOG: [clang-tidy][NFC] let multi-line string first line does not wrap (#160019)
add `\` to avoid a blank first line
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 0035da288dcf5..dfa429e6455b2 100755
--- a/clang-tools-extra/clang-tidy/add_new_check.py
+++ b/clang-tools-extra/clang-tidy/add_new_check.py
@@ -90,7 +90,7 @@ def write_header(
+ "_H"
)
f.write(
- """
+ """\
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
@@ -142,7 +142,7 @@ def write_implementation(
print("Creating %s..." % filename)
with io.open(filename, "w", encoding="utf8", newline="\n") as f:
f.write(
- """
+ """\
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
@@ -347,7 +347,8 @@ def write_test(
print("Creating %s..." % filename)
with io.open(filename, "w", encoding="utf8", newline="\n") as f:
f.write(
- """// RUN: %%check_clang_tidy %(standard)s%%s %(check_name_dashes)s %%t
+ """\
+// RUN: %%check_clang_tidy %(standard)s%%s %(check_name_dashes)s %%t
// FIXME: Add something that triggers the check here.
void f();
More information about the cfe-commits
mailing list