mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Update include-what-you-use darwin mapping file
Fixed a line or two tripped IWYU asserts about visibility when doing e.g. a private -> public mapping but the visibility it came up with was identical. Like the <iosfwd> to <string> mapping, it was defined as private -> public but they're both "public". Added a whole bunch of lines necessary to get sane/correct reccomendations from current IWYU on clang 10 on macOS Ventura. Incrementally I manually added these as needed while going through each line change IWYU wanted in each file.
This commit is contained in:
parent
ada9251412
commit
1d81ec3730
1 changed files with 79 additions and 17 deletions
|
@ -2,10 +2,27 @@
|
|||
# the version installed by HomeBrew doesn't have useful mappings for the
|
||||
# system provided headers. This also has mappings for FreeBSD.
|
||||
[
|
||||
{ include: ["<__functional_base>", private, "<functional>", public ] },
|
||||
{ include: ["<__mutex_base>", private, "<mutex>", public ] },
|
||||
{ include: ["@<__algorithm/.*>", "private", "<algorithm>", "public"] },
|
||||
{ include: ["@<__iterator/.*>", "private", "<iterator>", "public"] },
|
||||
{ include: ["@<__functional/.*>", "private", "<functional>", "public"] },
|
||||
{ include: ["@<__memory/.*>", "private", "<memory>", "public"] },
|
||||
{ include: ["@<__utility/.*>", "private", "<utility>", "public"] },
|
||||
{ include: ["@<__chrono/.*>", "private", "<chrono>", "public"] },
|
||||
{ include: ["@<__numeric/.*>", "private", "<numeric>", "public"] },
|
||||
{ include: ["@<__random/.*>", "private", "<random>", "public"] },
|
||||
{ include: ["@<__locale/.*>", "private", "<locale>", "public"] },
|
||||
{ include: ["@<xlocale/.*>", "private", "<xlocale.h>", "public"] },
|
||||
# ratio false positive. See https://groups.google.com/g/include-what-you-use/c/OKVkkWUlx44
|
||||
{ include: ["<ratio>", "public", "<chrono>", "public"] },
|
||||
{ include: ["<__locale>", "private", "<locale>", "public"] },
|
||||
{ include: ["<_ctype.h>", "private", "<ctype.h>", "public"] },
|
||||
{ include: ["<sys/_pthread/_pthread_once_t.h>", "private", "<pthread.h>", "public"] },
|
||||
{ include: ["<sys/_pthread/_pthread_mutex_t.h>", "private", "<pthread.h>", "public"] },
|
||||
{ include: ["<sys/_pthread/_pthread_rwlock_t.h>", "private", "<pthread.h>", "public"] },
|
||||
{ include: ["<sys/_pthread/_pthread_mutexattr_t.h>", "private", "<pthread.h>", "public"] },
|
||||
{ include: ["<sys/_pthread/_pthread_attr_t.h>", "private", "<pthread.h>", "public"] },
|
||||
{ include: ["<sys/_pthread/_pthread_cond_t.h>", "private", "<pthread.h>", "public"] },
|
||||
{ include: ["<sys/_pthread/_pthread_t.h>", "private", "<pthread.h>", "public"] },
|
||||
{ include: ["<sys/_pthread/_pthread_key_t.h>", "private", "<pthread.h>", "public"] },
|
||||
|
@ -20,7 +37,7 @@
|
|||
{ include: ["<sys/fcntl.h>", "private", "<fcntl.h>", "public"] },
|
||||
{ include: ["<sys/_types/_seek_set.h>", "private", "<fcntl.h>", "public"] },
|
||||
{ include: ["<sys/_types/_mbstate_t.h>", "private", "<wchar.h>", "public"] },
|
||||
{ include: ["<iosfwd>", "private", "<string>", "public"] },
|
||||
{ include: ["<iosfwd>", "public", "<string>", "public"] },
|
||||
{ include: ["<sys/_stdint.h>", "private", "<stdint.h>", "public"] },
|
||||
{ include: ["<sys/_types/_s_ifmt.h>", "private", "<sys/types.h>", "public"] },
|
||||
{ include: ["<sys/_types/_size_t.h>", "private", "<sys/types.h>", "public"] },
|
||||
|
@ -51,7 +68,6 @@
|
|||
{ include: ["<sys/_types/_va_list.h>", "private", "<sys/types.h>", "public"] },
|
||||
{ include: ["<sys/_types/_sigset_t.h>", "private", "<signal.h>", "public"] },
|
||||
{ include: ["<sys/signal.h>", "private", "<signal.h>", "public"] },
|
||||
{ include: ["<strings.h>", "private", "<string.h>", "public"] },
|
||||
{ include: ["<sys/termios.h>", "private", "<termios.h>", "public"] },
|
||||
{ include: ["<sys/_termios.h>", "private", "<termios.h>", "public"] },
|
||||
{ include: ["<sys/ttycom.h>", "private", "<termios.h>", "public"] },
|
||||
|
@ -61,7 +77,7 @@
|
|||
{ include: ["<sys/_types/_wint_t.h>", "private", "<stddef.h>", "public"] },
|
||||
{ include: ["<sys/_select.h>", "private", "<select.h>", "public"] },
|
||||
{ include: ["<sys/cdefs.h>", "private", "<unistd.h>", "public"] },
|
||||
{ include: ["<istream>", "private", "<iostream>", "public"] },
|
||||
{ include: ["<istream>", "public", "<iostream>", "public"] },
|
||||
{ include: ["<sys/_endian.h>", "private", "<netinet/in.h>", "public"] },
|
||||
{ include: ["<sys/_types/_timespec.h>", "private", "<time.h>", "public"] },
|
||||
{ include: ["<sys/_timespec.h>", "private", "<time.h>", "public"] },
|
||||
|
@ -70,22 +86,30 @@
|
|||
{ include: ["<__mutex_base>", "private", "<mutex>", "public"] },
|
||||
{ include: ["<__hash_table>", "private", "<unordered_map>", "public"] },
|
||||
{ include: ["<__hash_table>", "private", "<unordered_set>", "public"] },
|
||||
# { include: ["<>", "private", "<>", "public"] },
|
||||
|
||||
{ include: ['"../common.h"', "public", '"common.h"', "public"] },
|
||||
# We provide our own assert. including assert.h/cassert spoils it and redefines the macro
|
||||
{ symbol: ["assert", "private", '"common.h"', "public"] },
|
||||
{ symbol: ["assert", "private", '"../common.h"', "public"] },
|
||||
{ symbol: ["wcstring", "private", '"common.h"', "public"] },
|
||||
{ symbol: ["wcstring", "private", '"../common.h"', "public"] },
|
||||
{ symbol: ["wcstring_list_t", "private", '"common.h"', "public"] },
|
||||
{ symbol: ["wcstring_list_t", "private", '"../common.h"', "public"] },
|
||||
{ symbol: ["wcstring", "private", '"flog.h"', "public"] },
|
||||
{ symbol: ["wcstring_list_t", "private", '"flog.h"', "public"] },
|
||||
{ symbol: ["size_t", "private", "<cstddef>", "public"] },
|
||||
{ symbol: ["mutex", "private", "<mutex>", "public"] },
|
||||
{ symbol: ["sig_atomic_t", "private", "<csignal>", "public"] },
|
||||
{ symbol: ["va_end", "private", "<stdarg.h>", "public"] },
|
||||
{ symbol: ["va_list", "private", "<stdarg.h>", "public"] },
|
||||
{ symbol: ["va_start", "private", "<stdarg.h>", "public"] },
|
||||
{ symbol: ["NULL", "private", "<stddef.h>", "public"] },
|
||||
{ symbol: ["NULL", "private", "<cstddef>", "public"] },
|
||||
{ symbol: ["NULL", "private", "<stdlib.h>", "public"] },
|
||||
{ symbol: ["NULL", "private", "<stdio.h>", "public"] },
|
||||
{ symbol: ["NULL", "private", "<unistd.h>", "public"] },
|
||||
{ symbol: ["off_t", "private", "<unistd.h>", "public"] },
|
||||
{ symbol: ["off_t", "private", "<sys/types.h>", "public"] },
|
||||
{ symbol: ["size_t", "private", "<stddef.h>", "public"] },
|
||||
{ symbol: ["ssize_t", "private", "<stddef.h>", "public"] },
|
||||
{ symbol: ["size_t", "private", "<cstddef>", "public"] },
|
||||
{ symbol: ["ssize_t", "private", "<cstddef>", "public"] },
|
||||
{ symbol: ["intptr_t", "private", "<unistd.h>", "public"] },
|
||||
{ symbol: ["gid_t", "private", "<unistd.h>", "public"] },
|
||||
{ symbol: ["uid_t", "private", "<unistd.h>", "public"] },
|
||||
|
@ -94,16 +118,54 @@
|
|||
{ symbol: ["uid_t", "private", "<sys/types.h>", "public"] },
|
||||
{ symbol: ["gid_t", "private", "<sys/types.h>", "public"] },
|
||||
{ symbol: ["timeval", "private", "<sys/time.h>", "public"] },
|
||||
{ symbol: ["__uint32_t", "private", "<stdint.h>", "public"] },
|
||||
{ symbol: ["uint32_t", "private", "<stdint.h>", "public"] },
|
||||
{ symbol: ["intptr_t", "private", "<stdint.h>", "public"] },
|
||||
{ symbol: ["__uint32_t", "private", "<cstdint>", "public"] },
|
||||
{ symbol: ["uint32_t", "private", "<cstdint>", "public"] },
|
||||
{ symbol: ["intptr_t", "private", "<cstdint>", "public"] },
|
||||
{ symbol: ["tparm", "private", "<ncurses.h>", "public"] },
|
||||
{ symbol: ["tigetflag", "private", "<ncurses.h>", "public"] },
|
||||
{ symbol: ["ERR", "private", "<ncurses.h>", "public"] },
|
||||
{ symbol: ["OK", "private", "<ncurses.h>", "public"] },
|
||||
{ symbol: ["select", "private", "<sys/select.h>", "public"] },
|
||||
{ symbol: ["_LIBCPP_VERSION", "private", "<stddef.h>", "public"] },
|
||||
{ symbol: ["_LIBCPP_VERSION", "private", "<cstddef>", "public"] },
|
||||
{ symbol: ["_LIBCPP_VERSION", "private", "<unistd.h>", "public"] },
|
||||
{ symbol: ["MB_CUR_MAX", "private", "<xlocale.h>", "public"] },
|
||||
{ symbol: ["MB_CUR_MAX", "private", "<stdlib.h>", "public"] },
|
||||
{ symbol: ["MB_CUR_MAX", "private", "<cstdlib>", "public"] },
|
||||
{ symbol: ["MB_LEN_MAX", "private", "<cstdlib>", "public"] },
|
||||
{ symbol: ["WEOF", "private", "<cwctype>", "public"] },
|
||||
{ symbol: [ "std::declval", private, "<utility>", public ] },
|
||||
{ symbol: [ "std::forward", private, "<utility>", public ] },
|
||||
{ symbol: [ "std::move", private, "<utility>", public ] },
|
||||
{ symbol: [ "std::nullptr_t", private, "<cstddef>", public ] },
|
||||
{ symbol: [ "std::string", private, "<string>", public ] },
|
||||
{ symbol: [ "std::isalnum", private, "<locale>", public ] },
|
||||
{ symbol: [ "std::toupper", private, "<locale>", public ] },
|
||||
{ symbol: [ "sem_t", private, "<semaphore.h>", public ] },
|
||||
{ symbol: [ "sem_post", private, "<semaphore.h>", public ] },
|
||||
{ symbol: [ "sem_wait", private, "<semaphore.h>", public ] },
|
||||
{ symbol: [ "sem_init", private, "<semaphore.h>", public ] },
|
||||
{ symbol: [ "sem_destroy", private, "<semaphore.h>", public ] },
|
||||
{ symbol: [ "FD_SETSIZE", private, "<sys/select.h>", public ] },
|
||||
{ symbol: [ "locale_t", private, "<locale>", public ] },
|
||||
{ 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: [ "<fenv.h>", public, "<cfenv>", public ] },
|
||||
{ include: [ "<float.h>", public, "<cfloat>", public ] },
|
||||
{ include: [ "<inttypes.h>", public, "<cinttypes>", 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: [ "<stdalign.h>", public, "<cstdalign>", public ] },
|
||||
{ include: [ "<stdarg.h>", public, "<cstdarg>", public ] },
|
||||
{ include: [ "<stdbool.h>", public, "<cstdbool>", public ] },
|
||||
{ include: [ "<stddef.h>", public, "<cstddef>", public ] },
|
||||
{ include: [ "<stdlib.h>", public, "<cstdlib>", public ] },
|
||||
{ include: [ "<string.h>", public, "<cstring>", public ] },
|
||||
{ include: [ "<tgmath.h>", public, "<ctgmath>", public ] },
|
||||
{ include: [ "<time.h>", public, "<ctime>", public ] },
|
||||
{ include: [ "<uchar.h>", public, "<cuchar>", public ] },
|
||||
{ include: [ "<wchar.h>", public, "<cwchar>", public ] },
|
||||
{ include: [ "<wctype.h>", public, "<cwctype>", public ] },
|
||||
{ include: [ "<_xlocale.h>", private, "<xlocale.h>", public ] },
|
||||
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue