Skip to content

Commit 6884cc7

Browse files
authored
[clang-tidy][NFC] let multi-line string first line does not wrap (#160019)
add `\` to avoid a blank first line
1 parent e8e678c commit 6884cc7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def write_header(
9090
+ "_H"
9191
)
9292
f.write(
93-
"""
93+
"""\
9494
//===----------------------------------------------------------------------===//
9595
//
9696
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
@@ -142,7 +142,7 @@ def write_implementation(
142142
print("Creating %s..." % filename)
143143
with io.open(filename, "w", encoding="utf8", newline="\n") as f:
144144
f.write(
145-
"""
145+
"""\
146146
//===----------------------------------------------------------------------===//
147147
//
148148
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
@@ -347,7 +347,8 @@ def write_test(
347347
print("Creating %s..." % filename)
348348
with io.open(filename, "w", encoding="utf8", newline="\n") as f:
349349
f.write(
350-
"""// RUN: %%check_clang_tidy %(standard)s%%s %(check_name_dashes)s %%t
350+
"""\
351+
// RUN: %%check_clang_tidy %(standard)s%%s %(check_name_dashes)s %%t
351352
352353
// FIXME: Add something that triggers the check here.
353354
void f();

0 commit comments

Comments
 (0)