[libcxx-commits] [libcxx] [libc++] Add missing %{flags} substitution to clang-tidy (PR #171689)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Dec 11 05:56:12 PST 2025
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/171689
>From 4be1d3ced8aabdaf381a0b7acd791eafa082c8af Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Wed, 10 Dec 2025 15:12:26 -0500
Subject: [PATCH 1/2] [libc++] Add missing %{flags} substitution to clang-tidy
Flags that should be used both for compiling and for linking
are provided through the %{flags} substitution. Our clang-tidy
tests should be using them, not only %{compile_flags}.
---
libcxx/test/libcxx/clang_tidy.gen.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcxx/test/libcxx/clang_tidy.gen.py b/libcxx/test/libcxx/clang_tidy.gen.py
index 16c90c3ef7130..b46cc72c08dfd 100644
--- a/libcxx/test/libcxx/clang_tidy.gen.py
+++ b/libcxx/test/libcxx/clang_tidy.gen.py
@@ -27,7 +27,7 @@
{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=* -header-filter=.* --config-file=%{{libcxx-dir}}/.clang-tidy --load=%{{test-tools-dir}}/clang_tidy_checks/libcxx-tidy.plugin -- -Wweak-vtables %{{flags}} %{{compile_flags}} -fno-modules
#include <{header}>
""")
>From 33156856613fd16bfb6dc02cd78e1d46985f11fe Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Thu, 11 Dec 2025 08:56:00 -0500
Subject: [PATCH 2/2] Add missing NODEBUG
---
libcxx/include/string | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcxx/include/string b/libcxx/include/string
index 2b3ba6d2d9b62..8d49822f6fb39 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -756,7 +756,7 @@ public:
// external memory. In such cases, the destructor is responsible for unpoisoning
// the memory to avoid triggering false positives.
// Therefore it's crucial to ensure the destructor is called.
- using __trivially_relocatable = void;
+ using __trivially_relocatable _LIBCPP_NODEBUG = void;
# else
using __trivially_relocatable _LIBCPP_NODEBUG = __conditional_t<
__libcpp_is_trivially_relocatable<allocator_type>::value && __libcpp_is_trivially_relocatable<pointer>::value,
More information about the libcxx-commits
mailing list