blob: 60560307ef99f5839a0f32bfda4a8152c8880029 [file] [log] [blame]
[
# https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUMappings.md
# C++ alternatives to C standard headers
{ include: [ "<assert.h>", public, "<cassert>", public ] },
{ include: [ "<complex.h>", public, "<ccomplex>", public ] },
{ include: [ "<ctype.h>", public, "<cctype>", public ] },
{ include: [ "<errno.h>", public, "<cerrno>", public ] },
{ include: [ "<float.h>", public, "<cfloat>", public ] },
{ include: [ "<iso646.h>", public, "<ciso646>", public ] },
{ include: [ "<limits.h>", public, "<climits>", public ] },
{ include: [ "<locale.h>", public, "<clocale>", public ] },
{ include: [ "<math.h>", public, "<cmath>", public ] },
{ include: [ "<setjmp.h>", public, "<csetjmp>", public ] },
{ include: [ "<signal.h>", public, "<csignal>", public ] },
{ include: [ "<stdarg.h>", public, "<cstdarg>", public ] },
{ include: [ "<stddef.h>", public, "<cstddef>", public ] },
{ include: [ "<stdio.h>", public, "<cstdio>", public ] },
{ include: [ "<stdlib.h>", public, "<cstdlib>", public ] },
{ include: [ "<string.h>", public, "<cstring>", public ] },
{ include: [ "<time.h>", public, "<ctime>", public ] },
{ include: [ "<wchar.h>", public, "<cwchar>", public ] },
{ include: [ "<wctype.h>", public, "<cwctype>", public ] },
# HACK: check whether this can be removed with next iwyu release.
{ include: [ "<bits/cxxabi_forced.h>", private, "<ctime>", public ] },
{ include: [ "<bits/chrono.h>", private, "<chrono>", public ] },
{ include: [ "<bits/exception.h>", private, "<exception>", public ] },
{ include: [ "<bits/shared_ptr.h>", private, "<memory>", public ] },
{ include: [ "<bits/std_function.h>", private, "<functional>", public ] },
{ include: [ "<bits/refwrap.h>", private, "<functional>", public ] },
{ include: [ "<bits/std_abs.h>", private, "<stdlib.h>", public ] },
{ include: [ "<bits/stdint-intn.h>", private, "<stdint.h>", public ] },
{ include: [ "<bits/stdint-uintn.h>", private, "<stdint.h>", public ] },
{ include: [ "<bits/string_view.tcc>", private, "<string_view>", public ] },
{ include: [ "<bits/time.h>", private, "<time.h>", public ] },
{ include: [ "<bits/types/clock_t.h>", private, "<time.h>", public ] },
{ include: [ "<bits/types/mbstate_t.h>", private, "<wchar.h>", public ] },
{ include: [ "<bits/types/struct_timespec.h>", private, "<time.h>", public ] },
{ include: [ "<bits/types/struct_timeval.h>", private, "<time.h>", public ] },
{ include: [ "<bits/types/struct_tm.h>", private, "<time.h>", public ] },
{ include: [ "<bits/types/time_t.h>", private, "<time.h>", public ] },
# HACK: check whether this can be removed with next iwyu release.
{ symbol: [ "__GLIBC__", private, "<stdlib.h>", public ] },
# HACK: iwyu wrongly thinks that including <iosfwd> is sufficient.
{ symbol: [ "std::stringstream", private, "<sstream>", public ] },
{ symbol: [ "std::istringstream", private, "<sstream>", public ] },
{ symbol: [ "std::ostringstream", private, "<sstream>", public ] },
# HACK: iwyu attributes vector's usage of std::max to its caller.
# https://github.com/include-what-you-use/include-what-you-use/issues/908
{ symbol: ["std::max", "private", "<algorithm>", "public" ] },
{ symbol: ["std::max", "private", "<vector>", "public" ] },
# Wrappers for 3rd-party libraries
{ include: [ "@<.*curl/curlver.h>", private, "<cm3p/curl/curl.h>", public ] },
{ include: [ "@<.*curl/system.h>", private, "<cm3p/curl/curl.h>", public ] },
{ include: [ "@<.*json/config.h>", private, "<cm3p/json/value.h>", public ] },
{ include: [ "@<.*json/forwards.h>", private, "<cm3p/json/value.h>", public ] },
{ include: [ "@<.*uv/.+\\.h>", private, "<cm3p/uv.h>", public ] },
{ include: [ "@<.*expat_external.h>", private, "<cm3p/expat.h>", public ] },
{ include: [ "@<.*zconf.h>", private, "<cm3p/zlib.h>", public ] },
{ include: [ "@<.*cm_zlib_mangle.h>", private, "<cm3p/zlib.h>", public ] },
# # System symbols used by libuv
{ symbol: [ "ssize_t", private, "<cm3p/uv.h>", public ] },
{ symbol: [ "std::ifstream", private, "\"cmsys/FStream.hxx\"", public ] },
{ symbol: [ "std::ofstream", private, "\"cmsys/FStream.hxx\"", public ] },
{ symbol: [ "cmsys::ifstream", private, "\"cmsys/FStream.hxx\"", public ] },
{ symbol: [ "cmsys::ofstream", private, "\"cmsys/FStream.hxx\"", public ] },
{ include: [ "<istream>", public, "\"cmsys/FStream.hxx\"", public ] },
{ include: [ "<ostream>", public, "\"cmsys/FStream.hxx\"", public ] },
{ include: [ "<fstream>", public, "\"cmsys/FStream.hxx\"", public ] },
{ symbol: [ "mode_t", private, "\"cm_sys_stat.h\"", public ] },
{ symbol: [ "S_IWUSR", private, "\"cm_sys_stat.h\"", public ] },
{ symbol: [ "S_IWGRP", private, "\"cm_sys_stat.h\"", public ] },
{ include: [ "<filesystem>", public, "<cm/filesystem>", public ] },
{ include: [ "<optional>", public, "<cm/optional>", public ] },
{ include: [ "<shared_mutex>", public, "<cm/shared_mutex>", public ] },
{ include: [ "<string_view>", public, "<cm/string_view>", public ] },
# major and minor are used as macro arguments. Those are false matches.
{ symbol: [ "major", private, "\"cmVersion.h\"", public ] },
{ symbol: [ "minor", private, "\"cmVersion.h\"", public ] },
{ include: [ "<curses.h>", private, "\"cmCursesStandardIncludes.h\"", public ] },
{ include: [ "\"form.h\"", private, "\"cmCursesStandardIncludes.h\"", public ] },
{ include: [ "<form.h>", private, "\"cmCursesStandardIncludes.h\"", public ] },
# Help IWYU understand our explicit instantiation for cmConstStack.
{ symbol: [ "cmConstStack::cmConstStack<T, Stack>", private, "\"cmConstStack.h\"", public ] },
]
# vim: set ft=toml: