Description
libcxx/include/libcxx.imp
IWYU mappings file has several incorrect entries referring non-existing #include <>
files:
<fwd>
llvm-project/libcxx/include/libcxx.imp
Line 30 in 7cbf1a2
<debug_utils>
llvm-project/libcxx/include/libcxx.imp
Line 25 in 7cbf1a2
<support>
llvm-project/libcxx/include/libcxx.imp
Line 39 in 7cbf1a2
I suggest the following mappings for __fwd/*
:
diff --git a/libcxx_clang16.imp b/libcxx_clang16_fixed.imp
index 575ce0f..f818891 100644
--- a/libcxx_clang16.imp
+++ b/libcxx_clang16_fixed.imp
@@ -27,7 +27,16 @@
{ include: [ "@<__filesystem/.*>", "private", "<filesystem>", "public" ] },
{ include: [ "@<__format/.*>", "private", "<format>", "public" ] },
{ include: [ "@<__functional/.*>", "private", "<functional>", "public" ] },
- { include: [ "@<__fwd/.*>", "private", "<fwd>", "public" ] },
+ { include: [ "<__fwd/array.h>", "private", "<array>", "public" ] },
+ { include: [ "<__fwd/get.h>", "private", "<tuple>", "public" ] },
+ { include: [ "<__fwd/hash.h>", "private", "<functional>", "public" ] },
+ { include: [ "<__fwd/memory_resource.h>", "private", "<memory_resource>", "public" ] },
+ { include: [ "<__fwd/pair.h>", "private", "<utility>", "public" ] },
+ { include: [ "<__fwd/span.h>", "private", "<span>", "public" ] },
+ { include: [ "<__fwd/string.h>", "private", "<string>", "public" ] },
+ { include: [ "<__fwd/string_view.h>", "private", "<string_view>", "public" ] },
+ { include: [ "<__fwd/subrange.h>", "private", "<ranges>", "public" ] },
+ { include: [ "<__fwd/tuple.h>", "private", "<tuple>", "public" ] },
{ include: [ "@<__ios/.*>", "private", "<ios>", "public" ] },
{ include: [ "@<__iterator/.*>", "private", "<iterator>", "public" ] },
{ include: [ "@<__memory/.*>", "private", "<memory>", "public" ] },
__debug_utils/*
has only one file randomize_range.h
, which is used only in 3 algorithms: std::partial_sort
, std::nth_element
and std::sort
, so most probably __debug_utils/randomize_range.h
should be mapped to <algorithm>
.
__support/*
are included either from __locale
or from __threading support
, so public headers for them should be either <thread>
(for __support_ibm_nanosleep.h
) or <locale>
(for everything else).