[libcxx-commits] [libcxx] [libc++][test] Avoid some transitive includes in standard headers (PR #145846)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 25 23:02:44 PDT 2025


https://github.com/frederick-vs-ja created https://github.com/llvm/llvm-project/pull/145846

... for `mangled_names.pass.cpp`

Some builds of this test file seem failing due to not finding `std::errc`. Also removes includes of `<iostream>` and `<string_view>` as they're unused.

>From ee3e2963823bb4d19bd25b7af52661df6eee9e35 Mon Sep 17 00:00:00 2001
From: "A. Jiang" <de34 at live.cn>
Date: Thu, 26 Jun 2025 14:00:04 +0800
Subject: [PATCH] [libc++][test] Avoid some transitive includes in standard
 headers

... for `mangled_names.pass.cpp`

Some builds of this test file seem failing due to not finding
`std::errc`. Also removes includes of `<iostream>` and `<string_view>`
as they're unused.
---
 libcxx/test/libcxx/mangled_names.pass.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libcxx/test/libcxx/mangled_names.pass.cpp b/libcxx/test/libcxx/mangled_names.pass.cpp
index 210c40809781e..6ea8465d870c8 100644
--- a/libcxx/test/libcxx/mangled_names.pass.cpp
+++ b/libcxx/test/libcxx/mangled_names.pass.cpp
@@ -15,11 +15,12 @@
 
 #include <cassert>
 #include <charconv>
-#include <iostream>
+#include <cstddef>
 #include <map>
 #include <typeinfo>
 #include <string>
-#include <string_view>
+#include <system_error>
+#include <utility>
 
 template <class>
 struct mangling {};



More information about the libcxx-commits mailing list