[libcxx-commits] [libcxx] [libc++][NFC] Wrap line endings for clang-tidy tests (PR #171688)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 10 12:35:26 PST 2025
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/171688
>From fdfc635a14d9889adbddb7b38b06b0d287e86ca7 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Wed, 10 Dec 2025 15:10:55 -0500
Subject: [PATCH 1/2] [libc++][NFC] Wrap line endings for clang-tidy tests
Otherwise, the lines are extremely long and basically impossible
to read.
---
libcxx/test/libcxx/clang_tidy.gen.py | 6 +++++-
libcxx/test/libcxx/clang_tidy.sh.py | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/libcxx/test/libcxx/clang_tidy.gen.py b/libcxx/test/libcxx/clang_tidy.gen.py
index 16c90c3ef7130..2bd90d8f4f715 100644
--- a/libcxx/test/libcxx/clang_tidy.gen.py
+++ b/libcxx/test/libcxx/clang_tidy.gen.py
@@ -27,7 +27,11 @@
{lit_header_undeprecations.get(header, '')}
// TODO: run clang-tidy with modules enabled once they are supported
-// RUN: %{{clang-tidy}} %s --warnings-as-errors=* -header-filter=.* --config-file=%{{libcxx-dir}}/.clang-tidy --load=%{{test-tools-dir}}/clang_tidy_checks/libcxx-tidy.plugin -- -Wweak-vtables %{{compile_flags}} -fno-modules
+// RUN: %{{clang-tidy}} %s --warnings-as-errors=* \
+// RUN: -header-filter=.* \
+// RUN: --config-file=%{{libcxx-dir}}/.clang-tidy \
+// RUN: --load=%{{test-tools-dir}}/clang_tidy_checks/libcxx-tidy.plugin \
+// RUN: -- -Wweak-vtables %{{compile_flags}} -fno-modules
#include <{header}>
""")
diff --git a/libcxx/test/libcxx/clang_tidy.sh.py b/libcxx/test/libcxx/clang_tidy.sh.py
index 46f281f359209..630428564597d 100644
--- a/libcxx/test/libcxx/clang_tidy.sh.py
+++ b/libcxx/test/libcxx/clang_tidy.sh.py
@@ -8,4 +8,8 @@
# REQUIRES: has-clang-tidy
-# RUN: %{python} %{libcxx-dir}/../clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -clang-tidy-binary %{clang-tidy} -warnings-as-errors "*" -source-filter=".*libcxx/src.*" -quiet -p %{bin-dir}/..
+# RUN: %{python} %{libcxx-dir}/../clang-tools-extra/clang-tidy/tool/run-clang-tidy.py \
+# RUN: -clang-tidy-binary %{clang-tidy} \
+# RUN: -warnings-as-errors "*" \
+# RUN: -source-filter=".*libcxx/src.*" \
+# RUN: -quiet -p %{bin-dir}/..
>From 3c69366b5175f29a08774a09f35d696097910749 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Wed, 10 Dec 2025 15:35:16 -0500
Subject: [PATCH 2/2] Proper escaping within Python string
---
libcxx/test/libcxx/clang_tidy.gen.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libcxx/test/libcxx/clang_tidy.gen.py b/libcxx/test/libcxx/clang_tidy.gen.py
index 2bd90d8f4f715..614df2e5992f0 100644
--- a/libcxx/test/libcxx/clang_tidy.gen.py
+++ b/libcxx/test/libcxx/clang_tidy.gen.py
@@ -27,10 +27,10 @@
{lit_header_undeprecations.get(header, '')}
// TODO: run clang-tidy with modules enabled once they are supported
-// RUN: %{{clang-tidy}} %s --warnings-as-errors=* \
-// RUN: -header-filter=.* \
-// RUN: --config-file=%{{libcxx-dir}}/.clang-tidy \
-// RUN: --load=%{{test-tools-dir}}/clang_tidy_checks/libcxx-tidy.plugin \
+// RUN: %{{clang-tidy}} %s --warnings-as-errors=* \\
+// RUN: -header-filter=.* \\
+// RUN: --config-file=%{{libcxx-dir}}/.clang-tidy \\
+// RUN: --load=%{{test-tools-dir}}/clang_tidy_checks/libcxx-tidy.plugin \\
// RUN: -- -Wweak-vtables %{{compile_flags}} -fno-modules
#include <{header}>
More information about the libcxx-commits
mailing list