https://github.com/HerrCai0907 created 
https://github.com/llvm/llvm-project/pull/160019

add \ to avoid a blank first line


>From f75f6e96538e8de5b639a9416ee979b0f4de0de8 Mon Sep 17 00:00:00 2001
From: Congcong Cai <congcongcai0...@163.com>
Date: Mon, 22 Sep 2025 10:00:30 +0800
Subject: [PATCH] [clang-tidy][NFC] let multi-line string first line does not
 wrap

add \ to avoid a blank first line
---
 clang-tools-extra/clang-tidy/add_new_check.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

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();

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to