From a827003e3052c6d9ee7bdb71518182e9bd76317d Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sat, 25 Nov 2023 11:32:32 +0100 Subject: [PATCH] build: rework IWYU mapping files Create mapping to most of the C spec and some POSIX specific functions. This is more robust than relying files shipped with IWYU. --- Makefile | 1 + cmake.config/iwyu/c99.imp | 377 ++++++++++++++++++++++++++++++ cmake.config/iwyu/gcc.libc.imp | 226 ------------------ cmake.config/iwyu/gcc.symbols.imp | 305 ------------------------ cmake.config/iwyu/mapping.imp | 32 ++- cmake.config/iwyu/posix.imp | 110 +++++++++ src/nvim/CMakeLists.txt | 4 +- src/nvim/api/deprecated.c | 2 +- src/nvim/api/extmark.c | 3 +- src/nvim/api/win_config.c | 2 +- src/nvim/change.c | 1 - src/nvim/charset.c | 1 - src/nvim/decoration.c | 8 + src/nvim/drawline.c | 2 +- src/nvim/drawscreen.c | 3 +- src/nvim/eval/funcs.c | 2 + src/nvim/eval/vars.c | 1 + src/nvim/event/libuv_process.c | 1 + src/nvim/event/loop.h | 1 + src/nvim/event/multiqueue.c | 1 - src/nvim/event/rstream.c | 1 + src/nvim/ex_cmds.c | 2 +- src/nvim/extmark.c | 3 +- src/nvim/fileio.c | 1 + src/nvim/fold.c | 1 + src/nvim/input.c | 1 + src/nvim/lua/stdlib.c | 2 +- src/nvim/mbyte.c | 1 - src/nvim/move.c | 2 +- src/nvim/msgpack_rpc/channel.c | 1 - src/nvim/option.c | 1 - src/nvim/os/fs.c | 1 + src/nvim/os/unix_defs.h | 1 + src/nvim/plines.c | 1 + src/nvim/regexp.c | 1 - src/nvim/sign.c | 8 + src/nvim/tui/input.c | 1 - src/nvim/tui/tui.c | 1 + 38 files changed, 541 insertions(+), 572 deletions(-) create mode 100644 cmake.config/iwyu/c99.imp delete mode 100644 cmake.config/iwyu/gcc.libc.imp delete mode 100644 cmake.config/iwyu/gcc.symbols.imp create mode 100644 cmake.config/iwyu/posix.imp diff --git a/Makefile b/Makefile index 4b130476f1..50b260d62c 100644 --- a/Makefile +++ b/Makefile @@ -141,6 +141,7 @@ iwyu: build/.ran-cmake cmake --build build > build/iwyu.log iwyu-fix-includes --only_re="src/nvim" --ignore_re="src/nvim/(auto|map.h|eval/encode.c)" --safe_headers < build/iwyu.log cmake -B build -U ENABLE_IWYU + cmake --build build clean: +test -d build && $(BUILD_TOOL) -C build clean || true diff --git a/cmake.config/iwyu/c99.imp b/cmake.config/iwyu/c99.imp new file mode 100644 index 0000000000..5f714c88b9 --- /dev/null +++ b/cmake.config/iwyu/c99.imp @@ -0,0 +1,377 @@ +# Symbols defined in the C spec. +# These are taken from https://port70.net/~nsz/c/c99/n1256.html#B + +[ + #B.3 Character handling + { symbol: ["isalnum", private, "", public ] }, + { symbol: ["isalpha", private, "", public ] }, + { symbol: ["isblank", private, "", public ] }, + { symbol: ["iscntrl", private, "", public ] }, + { symbol: ["isdigit", private, "", public ] }, + { symbol: ["isgraph", private, "", public ] }, + { symbol: ["islower", private, "", public ] }, + { symbol: ["isprint", private, "", public ] }, + { symbol: ["ispunct", private, "", public ] }, + { symbol: ["isspace", private, "", public ] }, + { symbol: ["isupper", private, "", public ] }, + { symbol: ["isxdigi", private, "", public ] }, + { symbol: ["tolower", private, "", public ] }, + { symbol: ["toupper", private, "", public ] }, + + # B.4 Errors + { symbol: ["EDOM", private, "", public ] }, + { symbol: ["EILSEQ", private, "", public ] }, + { symbol: ["ERANGE", private, "", public ] }, + { symbol: ["errno", private, "", public ] }, + + # B.10 Localization + { symbol: ["lconv", private, "", public ] }, + { symbol: ["NULL", private, "", public ] }, + { symbol: ["LC_ALL", private, "", public ] }, + { symbol: ["LC_COLLATE", private, "", public ] }, + { symbol: ["LC_CTYPE", private, "", public ] }, + { symbol: ["LC_MONETARY", private, "", public ] }, + { symbol: ["LC_NUMERIC", private, "", public ] }, + { symbol: ["LC_TIME", private, "", public ] }, + { symbol: ["setlocale", private, "", public ] }, + { symbol: ["localeconv", private, "", public ] }, + + # B.14 Variable arguments + { symbol: ["va_list", private, "", public ] }, + { symbol: ["va_arg", private, "", public ] }, + { symbol: ["va_copy", private, "", public ] }, + { symbol: ["va_end", private, "", public ] }, + { symbol: ["va_start", private, "", public ] }, + + # B.16 Common definitions + { symbol: ["ptrdiff_t", private, "", public ] }, + { symbol: ["size_t", private, "", public ] }, + { symbol: ["wchar_t", private, "", public ] }, + { symbol: ["NULL", private, "", public ] }, + { symbol: ["offsetof", private, "", public ] }, + + # B.17 Integer types + { symbol: ["int8_t", private, "", public ] }, + { symbol: ["uint8_t", private, "", public ] }, + { symbol: ["int_least8_t", private, "", public ] }, + { symbol: ["uint_least8_t", private, "", public ] }, + { symbol: ["int_fast8_t", private, "", public ] }, + { symbol: ["uint_fast8_t", private, "", public ] }, + { symbol: ["INT8_MIN", private, "", public ] }, + { symbol: ["INT8_MAX", private, "", public ] }, + { symbol: ["UINT8_MAX", private, "", public ] }, + { symbol: ["INT_LEAST8_MIN", private, "", public ] }, + { symbol: ["INT_LEAST8_MAX", private, "", public ] }, + { symbol: ["UINT_LEAST8_MAX", private, "", public ] }, + { symbol: ["INT_FAST8_MIN", private, "", public ] }, + { symbol: ["INT_FAST8_MAX", private, "", public ] }, + { symbol: ["UINT_FAST8_MAX", private, "", public ] }, + { symbol: ["INT8_C", private, "", public ] }, + { symbol: ["UINT8_C", private, "", public ] }, + { symbol: ["int16_t", private, "", public ] }, + { symbol: ["uint16_t", private, "", public ] }, + { symbol: ["int_least16_t", private, "", public ] }, + { symbol: ["uint_least16_t", private, "", public ] }, + { symbol: ["int_fast16_t", private, "", public ] }, + { symbol: ["uint_fast16_t", private, "", public ] }, + { symbol: ["INT16_MIN", private, "", public ] }, + { symbol: ["INT16_MAX", private, "", public ] }, + { symbol: ["UINT16_MAX", private, "", public ] }, + { symbol: ["INT_LEAST16_MIN", private, "", public ] }, + { symbol: ["INT_LEAST16_MAX", private, "", public ] }, + { symbol: ["UINT_LEAST16_MAX", private, "", public ] }, + { symbol: ["INT_FAST16_MIN", private, "", public ] }, + { symbol: ["INT_FAST16_MAX", private, "", public ] }, + { symbol: ["UINT_FAST16_MAX", private, "", public ] }, + { symbol: ["INT16_C", private, "", public ] }, + { symbol: ["UINT16_C", private, "", public ] }, + { symbol: ["int32_t", private, "", public ] }, + { symbol: ["uint32_t", private, "", public ] }, + { symbol: ["int_least32_t", private, "", public ] }, + { symbol: ["uint_least32_t", private, "", public ] }, + { symbol: ["int_fast32_t", private, "", public ] }, + { symbol: ["uint_fast32_t", private, "", public ] }, + { symbol: ["INT32_MIN", private, "", public ] }, + { symbol: ["INT32_MAX", private, "", public ] }, + { symbol: ["UINT32_MAX", private, "", public ] }, + { symbol: ["INT_LEAST32_MIN", private, "", public ] }, + { symbol: ["INT_LEAST32_MAX", private, "", public ] }, + { symbol: ["UINT_LEAST32_MAX", private, "", public ] }, + { symbol: ["INT_FAST32_MIN", private, "", public ] }, + { symbol: ["INT_FAST32_MAX", private, "", public ] }, + { symbol: ["UINT_FAST32_MAX", private, "", public ] }, + { symbol: ["INT32_C", private, "", public ] }, + { symbol: ["UINT32_C", private, "", public ] }, + { symbol: ["int64_t", private, "", public ] }, + { symbol: ["uint64_t", private, "", public ] }, + { symbol: ["int_least64_t", private, "", public ] }, + { symbol: ["uint_least64_t", private, "", public ] }, + { symbol: ["int_fast64_t", private, "", public ] }, + { symbol: ["uint_fast64_t", private, "", public ] }, + { symbol: ["INT64_MIN", private, "", public ] }, + { symbol: ["INT64_MAX", private, "", public ] }, + { symbol: ["UINT64_MAX", private, "", public ] }, + { symbol: ["INT_LEAST64_MIN", private, "", public ] }, + { symbol: ["INT_LEAST64_MAX", private, "", public ] }, + { symbol: ["UINT_LEAST64_MAX", private, "", public ] }, + { symbol: ["INT_FAST64_MIN", private, "", public ] }, + { symbol: ["INT_FAST64_MAX", private, "", public ] }, + { symbol: ["UINT_FAST64_MAX", private, "", public ] }, + { symbol: ["INT64_C", private, "", public ] }, + { symbol: ["UINT64_C", private, "", public ] }, + { symbol: ["intptr_t", private, "", public ] }, + { symbol: ["uintptr_t", private, "", public ] }, + { symbol: ["intmax_t", private, "", public ] }, + { symbol: ["uintmax_t", private, "", public ] }, + { symbol: ["INTPTR_MIN", private, "", public ] }, + { symbol: ["INTPTR_MAX", private, "", public ] }, + { symbol: ["UINTPTR_MAX", private, "", public ] }, + { symbol: ["INTMAX_MIN", private, "", public ] }, + { symbol: ["INTMAX_MAX", private, "", public ] }, + { symbol: ["UINTMAX_MAX", private, "", public ] }, + { symbol: ["PTRDIFF_MIN", private, "", public ] }, + { symbol: ["PTRDIFF_MAX", private, "", public ] }, + { symbol: ["SIG_ATOMIC_MIN", private, "", public ] }, + { symbol: ["SIG_ATOMIC_MAX", private, "", public ] }, + { symbol: ["SIZE_MAX", private, "", public ] }, + { symbol: ["WCHAR_MIN", private, "", public ] }, + { symbol: ["WCHAR_MAX", private, "", public ] }, + { symbol: ["WINT_MIN", private, "", public ] }, + { symbol: ["WINT_MAX", private, "", public ] }, + { symbol: ["INTMAX_C", private, "", public ] }, + { symbol: ["UINTMAX_C", private, "", public ] }, + + # B.18 Input/output + { symbol: ["size_t", private, "", public ] }, + { symbol: ["FILE", private, "", public ] }, + { symbol: ["fpos_t", private, "", public ] }, + { symbol: ["NULL", private, "", public ] }, + { symbol: ["_IOFBF", private, "", public ] }, + { symbol: ["_IOLBF", private, "", public ] }, + { symbol: ["_IONBF", private, "", public ] }, + { symbol: ["BUFSIZ", private, "", public ] }, + { symbol: ["EOF", private, "", public ] }, + { symbol: ["FOPEN_MAX", private, "", public ] }, + { symbol: ["FILENAME_MAX", private, "", public ] }, + { symbol: ["L_tmpnam", private, "", public ] }, + { symbol: ["SEEK_CUR", private, "", public ] }, + { symbol: ["SEEK_END", private, "", public ] }, + { symbol: ["SEEK_SET", private, "", public ] }, + { symbol: ["TMP_MAX", private, "", public ] }, + { symbol: ["stderr", private, "", public ] }, + { symbol: ["stdin", private, "", public ] }, + { symbol: ["stdout", private, "", public ] }, + { symbol: ["remove", private, "", public ] }, + { symbol: ["rename", private, "", public ] }, + { symbol: ["tmpfile", private, "", public ] }, + { symbol: ["tmpnam", private, "", public ] }, + { symbol: ["fclose", private, "", public ] }, + { symbol: ["fflush", private, "", public ] }, + { symbol: ["fopen", private, "", public ] }, + { symbol: ["freopen", private, "", public ] }, + { symbol: ["setbuf", private, "", public ] }, + { symbol: ["setvbuf", private, "", public ] }, + { symbol: ["fprintf", private, "", public ] }, + { symbol: ["fscanf", private, "", public ] }, + { symbol: ["printf", private, "", public ] }, + { symbol: ["scanf", private, "", public ] }, + { symbol: ["snprintf", private, "", public ] }, + { symbol: ["sprintf", private, "", public ] }, + { symbol: ["sscanf", private, "", public ] }, + { symbol: ["vfprintf", private, "", public ] }, + { symbol: ["vfscanf", private, "", public ] }, + { symbol: ["vprintf", private, "", public ] }, + { symbol: ["vscanf", private, "", public ] }, + { symbol: ["vsnprintf", private, "", public ] }, + { symbol: ["vsprintf", private, "", public ] }, + { symbol: ["vsscanf", private, "", public ] }, + { symbol: ["fgetc", private, "", public ] }, + { symbol: ["fgets", private, "", public ] }, + { symbol: ["fputc", private, "", public ] }, + { symbol: ["fputs", private, "", public ] }, + { symbol: ["getc", private, "", public ] }, + { symbol: ["getchar", private, "", public ] }, + { symbol: ["gets", private, "", public ] }, + { symbol: ["putc", private, "", public ] }, + { symbol: ["putchar", private, "", public ] }, + { symbol: ["puts", private, "", public ] }, + { symbol: ["ungetc", private, "", public ] }, + { symbol: ["fread", private, "", public ] }, + { symbol: ["fwrite", private, "", public ] }, + { symbol: ["fgetpos", private, "", public ] }, + { symbol: ["fseek", private, "", public ] }, + { symbol: ["fsetpos", private, "", public ] }, + { symbol: ["ftell", private, "", public ] }, + { symbol: ["rewind", private, "", public ] }, + { symbol: ["clearerr", private, "", public ] }, + { symbol: ["feof", private, "", public ] }, + { symbol: ["ferror", private, "", public ] }, + { symbol: ["perror", private, "", public ] }, + + # B.19 General utilities + { symbol: ["size_t", private, "", public ] }, + { symbol: ["wchar_t", private, "", public ] }, + { symbol: ["div_t", private, "", public ] }, + { symbol: ["ldiv_t", private, "", public ] }, + { symbol: ["lldiv_t", private, "", public ] }, + { symbol: ["NULL", private, "", public ] }, + { symbol: ["EXIT_FAILURE", private, "", public ] }, + { symbol: ["EXIT_SUCCESS", private, "", public ] }, + { symbol: ["RAND_MAX", private, "", public ] }, + { symbol: ["MB_CUR_MAX", private, "", public ] }, + { symbol: ["atof", private, "", public ] }, + { symbol: ["atoi", private, "", public ] }, + { symbol: ["atol", private, "", public ] }, + { symbol: ["atoll", private, "", public ] }, + { symbol: ["strtod", private, "", public ] }, + { symbol: ["strtof", private, "", public ] }, + { symbol: ["strtold", private, "", public ] }, + { symbol: ["strtol", private, "", public ] }, + { symbol: ["strtoll", private, "", public ] }, + { symbol: ["strtoul", private, "", public ] }, + { symbol: ["strtoull", private, "", public ] }, + { symbol: ["rand", private, "", public ] }, + { symbol: ["srand", private, "", public ] }, + { symbol: ["calloc", private, "", public ] }, + { symbol: ["free", private, "", public ] }, + { symbol: ["malloc", private, "", public ] }, + { symbol: ["realloc", private, "", public ] }, + { symbol: ["abort", private, "", public ] }, + { symbol: ["atexit", private, "", public ] }, + { symbol: ["exit", private, "", public ] }, + { symbol: ["_Exit", private, "", public ] }, + { symbol: ["getenv", private, "", public ] }, + { symbol: ["system", private, "", public ] }, + { symbol: ["bsearch", private, "", public ] }, + { symbol: ["qsort", private, "", public ] }, + { symbol: ["abs", private, "", public ] }, + { symbol: ["labs", private, "", public ] }, + { symbol: ["llabs", private, "", public ] }, + { symbol: ["div", private, "", public ] }, + { symbol: ["ldiv", private, "", public ] }, + { symbol: ["lldiv", private, "", public ] }, + { symbol: ["mblen", private, "", public ] }, + { symbol: ["mbtowc", private, "", public ] }, + { symbol: ["wctomb", private, "", public ] }, + { symbol: ["mbstowcs", private, "", public ] }, + { symbol: ["wcstombs", private, "", public ] }, + + # B.20 String handling + { symbol: ["size_t", private, "", public ] }, + { symbol: ["NULL", private, "", public ] }, + { symbol: ["memcpy", private, "", public ] }, + { symbol: ["memmove", private, "", public ] }, + { symbol: ["strcpy", private, "", public ] }, + { symbol: ["strncpy", private, "", public ] }, + { symbol: ["strcat", private, "", public ] }, + { symbol: ["strncat", private, "", public ] }, + { symbol: ["memcmp", private, "", public ] }, + { symbol: ["strcmp", private, "", public ] }, + { symbol: ["strcoll", private, "", public ] }, + { symbol: ["strncmp", private, "", public ] }, + { symbol: ["strxfrm", private, "", public ] }, + { symbol: ["memchr", private, "", public ] }, + { symbol: ["strchr", private, "", public ] }, + { symbol: ["strcspn", private, "", public ] }, + { symbol: ["strpbrk", private, "", public ] }, + { symbol: ["strrchr", private, "", public ] }, + { symbol: ["strspn", private, "", public ] }, + { symbol: ["strstr", private, "", public ] }, + { symbol: ["strtok", private, "", public ] }, + { symbol: ["memset", private, "", public ] }, + { symbol: ["strerror", private, "", public ] }, + { symbol: ["strlen", private, "", public ] }, + + # B.22 Date and time + { symbol: ["NULL", private, "", public ] }, + { symbol: ["CLOCKS_PER_SEC", private, "", public ] }, + { symbol: ["size_t", private, "", public ] }, + { symbol: ["clock_t", private, "", public ] }, + { symbol: ["time_t", private, "", public ] }, + { symbol: ["tm", private, "", public ] }, + { symbol: ["clock", private, "", public ] }, + { symbol: ["difftime", private, "", public ] }, + { symbol: ["mktime", private, "", public ] }, + { symbol: ["time", private, "", public ] }, + { symbol: ["asctime", private, "", public ] }, + { symbol: ["ctime", private, "", public ] }, + { symbol: ["gmtime", private, "", public ] }, + { symbol: ["localtime", private, "", public ] }, + { symbol: ["strftime", private, "", public ] }, + + # B.23 Extended multibyte/wide character utilities + { symbol: ["wchar_t", private, "", public ] }, + { symbol: ["wint_t", private, "", public ] }, + { symbol: ["WCHAR_MAX", private, "", public ] }, + { symbol: ["size_t", private, "", public ] }, + { symbol: ["tm", private, "", public ] }, + { symbol: ["WCHAR_MIN", private, "", public ] }, + { symbol: ["mbstate_t", private, "", public ] }, + { symbol: ["NULL", private, "", public ] }, + { symbol: ["WEOF", private, "", public ] }, + { symbol: ["fwprintf", private, "", public ] }, + { symbol: ["fwscanf", private, "", public ] }, + { symbol: ["swprintf", private, "", public ] }, + { symbol: ["swscanf", private, "", public ] }, + { symbol: ["vfwprintf", private, "", public ] }, + { symbol: ["vfwscanf", private, "", public ] }, + { symbol: ["vswprintf", private, "", public ] }, + { symbol: ["vswscanf", private, "", public ] }, + { symbol: ["vwprintf", private, "", public ] }, + { symbol: ["vwscanf", private, "", public ] }, + { symbol: ["wprintf", private, "", public ] }, + { symbol: ["wscanf", private, "", public ] }, + { symbol: ["fgetwc", private, "", public ] }, + { symbol: ["fgetws", private, "", public ] }, + { symbol: ["fputwc", private, "", public ] }, + { symbol: ["fputws", private, "", public ] }, + { symbol: ["fwide", private, "", public ] }, + { symbol: ["getwc", private, "", public ] }, + { symbol: ["getwchar", private, "", public ] }, + { symbol: ["putwc", private, "", public ] }, + { symbol: ["putwchar", private, "", public ] }, + { symbol: ["ungetwc", private, "", public ] }, + { symbol: ["wcstod", private, "", public ] }, + { symbol: ["wcstof", private, "", public ] }, + { symbol: ["wcstold", private, "", public ] }, + { symbol: ["wcstol", private, "", public ] }, + { symbol: ["wcstoll", private, "", public ] }, + { symbol: ["wcstoul", private, "", public ] }, + { symbol: ["wcstoull", private, "", public ] }, + { symbol: ["wcscpy", private, "", public ] }, + { symbol: ["wcsncpy", private, "", public ] }, + { symbol: ["wmemcpy", private, "", public ] }, + { symbol: ["wmemmove", private, "", public ] }, + { symbol: ["wcscat", private, "", public ] }, + { symbol: ["wcsncat", private, "", public ] }, + { symbol: ["wcscmp", private, "", public ] }, + { symbol: ["wcscoll", private, "", public ] }, + { symbol: ["wcsncmp", private, "", public ] }, + { symbol: ["wcsxfrm", private, "", public ] }, + { symbol: ["wmemcmp", private, "", public ] }, + { symbol: ["wcschr", private, "", public ] }, + { symbol: ["wcscspn", private, "", public ] }, + { symbol: ["wcspbrk", private, "", public ] }, + { symbol: ["wcsrchr", private, "", public ] }, + { symbol: ["wcsspn", private, "", public ] }, + { symbol: ["wcsstr", private, "", public ] }, + { symbol: ["wcstok", private, "", public ] }, + { symbol: ["wmemchr", private, "", public ] }, + { symbol: ["wcslen", private, "", public ] }, + { symbol: ["wmemset", private, "", public ] }, + { symbol: ["wcsftime", private, "", public ] }, + { symbol: ["btowc", private, "", public ] }, + { symbol: ["wctob", private, "", public ] }, + { symbol: ["mbsinit", private, "", public ] }, + { symbol: ["mbrlen", private, "", public ] }, + { symbol: ["mbrtowc", private, "", public ] }, + { symbol: ["wcrtomb", private, "", public ] }, + { symbol: ["mbsrtowcs", private, "", public ] }, + { symbol: ["wcsrtombs", private, "", public ] }, + + # inttypes.h includes stdint.h + # https://port70.net/~nsz/c/c99/n1256.html#7.8p1 + { include: [ "", public, "", public ] }, +] + +# vim: set ft=toml: diff --git a/cmake.config/iwyu/gcc.libc.imp b/cmake.config/iwyu/gcc.libc.imp deleted file mode 100644 index 1dd0ad42c7..0000000000 --- a/cmake.config/iwyu/gcc.libc.imp +++ /dev/null @@ -1,226 +0,0 @@ -# This was initially taken from the IWYU repository: -# github.com/include-what-you-use/include-what-you-use/blob/164b8fe7597805ae55f029ecf6580dc46a74c7ed/gcc.libc.imp -# It has useful mappings that are normally enabled by default, but there are -# other default mappings that conflict with our builds. The best solution seems -# to be to disable all defaults, import the defaults from the IWYU -# repo and modify the rules that conflict with our build. -# -# TODO(dundargoc): Check if there is a way to disable specific builtin maps as -# to avoid this file entirely. - -# Mappings for GNU libc -# ( cd /usr/include && grep '^ *# *include' {sys/,net/,}* | perl -nle 'm/^([^:]+).*<([^>]+)>/ && print qq@ { include: [ "<$2>", private, "<$1>", public ] },@' | grep bits/ | sort ) -# When I saw more than one mapping for these, I typically picked -# what I thought was the "best" one. -[ - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - # Sometimes libc tells you what mapping to do via an '#error': - # # error "Never use directly; include instead." - # or - # # error "Never include directly; use instead." - # ( cd /usr/include && grep -R '^ *# *error "Never use\|include' * | perl -nle 'm/<([^>]+).*directly.*<([^>]+)/ && print qq@ { include: [ "<$1>", private, "<$2>", public ] },@' | sort ) - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - # Top-level #includes that just forward to another file: - # $ for i in /usr/include/*; do [ -f $i ] } && [ `wc -l < $i` = 1 ] } && echo $i; done - # (poll.h, syscall.h, syslog.h, ustat.h, wait.h). - # For each file, I looked at the list of canonical header files -- - # http://www.opengroup.org/onlinepubs/9699919799/idx/head.html -- - # to decide which of the two files is canonical. If neither is - # on the POSIX.1 1998 list, I just choose the top-level one. - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - # These are all files in bits/ that delegate to asm/ and linux/ to - # do all (or lots) of the work. Note these are private->private. - # $ for i in /usr/include/bits/*; do for dir in asm linux; do grep -H -e $dir/`basename $i` $i; done; done - { include: [ "", private, "", private ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", private ] }, - # Some asm files have 32- and 64-bit variants: - # $ ls /usr/include/asm/*_{32,64}.h - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", private ] }, - { include: [ "", private, "", private ] }, - # I don't know what grep would have found these. I found them - # via user report. - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, # PATH_MAX - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - # Exports guaranteed by the C standard - { include: [ "", public, "", public ] }, -] - -# vim: set ft=toml: diff --git a/cmake.config/iwyu/gcc.symbols.imp b/cmake.config/iwyu/gcc.symbols.imp deleted file mode 100644 index 6066de9d09..0000000000 --- a/cmake.config/iwyu/gcc.symbols.imp +++ /dev/null @@ -1,305 +0,0 @@ -# This was initially taken from the IWYU repository: -# github.com/include-what-you-use/include-what-you-use/blob/164b8fe7597805ae55f029ecf6580dc46a74c7ed/gcc.symbols.imp -# It has useful mappings that are normally enabled by default, but there are -# other default mappings that conflict with our builds. The best solution seems -# to be to disable all defaults, import the defaults from the IWYU repo and -# modify the rules that conflict with our build. -# -# TODO(dundargoc): Check if there is a way to disable specific builtin maps as -# to avoid this file entirely. - -# For library symbols that can be defined in more than one header -# file, maps from symbol-name to legitimate header files. -# This list was generated via -# grep -R '__.*_defined' /usr/include | perl -nle 'm,/usr/include/([^:]*):#\s*\S+ __(.*)_defined, and print qq@ { symbol: [ "$2", public, "<$1>", public ] },@' | sort -u -# I ignored all entries that only appeared once on the list (eg uint32_t). -# I then added in NULL, which according to [diff.null] C.2.2.3, can -# be defined in , , , , -# , , or . We also allow their C -# equivalents. -# In each case, I ordered them so was first, if it was -# an option for this type. That's the preferred #include all else -# equal. The same goes for . The visibility on the -# symbol-name is ignored; by convention we always set it to private. -[ - { symbol: [ "aiocb", private, "", public ] }, - { symbol: [ "blkcnt_t", private, "", public ] }, - { symbol: [ "blkcnt_t", private, "", public ] }, - { symbol: [ "blksize_t", private, "", public ] }, - { symbol: [ "blksize_t", private, "", public ] }, - { symbol: [ "cc_t", private, "", private ] }, - { symbol: [ "clock_t", private, "", public ] }, - { symbol: [ "clock_t", private, "", public ] }, - { symbol: [ "clock_t", private, "", public ] }, - { symbol: [ "clockid_t", private, "", public ] }, - { symbol: [ "clockid_t", private, "", public ] }, - { symbol: [ "daddr_t", private, "", public ] }, - { symbol: [ "daddr_t", private, "", public ] }, - { symbol: [ "dev_t", private, "", public ] }, - { symbol: [ "dev_t", private, "", public ] }, - { symbol: [ "div_t", private, "", public ] }, - { symbol: [ "double_t", private, "", public ] }, - { symbol: [ "error_t", private, "", public ] }, - { symbol: [ "error_t", private, "", public ] }, - { symbol: [ "error_t", private, "", public ] }, - { symbol: [ "fd_set", private, "", public ] }, - { symbol: [ "fd_set", private, "", public ] }, - { symbol: [ "fenv_t", private, "", public ] }, - { symbol: [ "fexcept_t", private, "", public ] }, - { symbol: [ "FILE", private, "", public ] }, - { symbol: [ "FILE", private, "", public ] }, - { symbol: [ "float_t", private, "", public ] }, - { symbol: [ "fsblkcnt_t", private, "", public ] }, - { symbol: [ "fsblkcnt_t", private, "", public ] }, - { symbol: [ "fsfilcnt_t", private, "", public ] }, - { symbol: [ "fsfilcnt_t", private, "", public ] }, - { symbol: [ "getopt", private, "", private ] }, - { symbol: [ "gid_t", private, "", public ] }, - { symbol: [ "gid_t", private, "", public ] }, - { symbol: [ "gid_t", private, "", public ] }, - { symbol: [ "gid_t", private, "", public ] }, - { symbol: [ "gid_t", private, "", public ] }, - { symbol: [ "gid_t", private, "", public ] }, - { symbol: [ "gid_t", private, "", public ] }, - { symbol: [ "gid_t", private, "", private ] }, - { symbol: [ "htonl", private, "", private ] }, - { symbol: [ "htons", private, "", private ] }, - { symbol: [ "id_t", private, "", public ] }, - { symbol: [ "id_t", private, "", public ] }, - { symbol: [ "imaxdiv_t", private, "", public ] }, - { symbol: [ "intmax_t", private, "", public ] }, - { symbol: [ "uintmax_t", private, "", public ] }, - { symbol: [ "ino64_t", private, "", public ] }, - { symbol: [ "ino64_t", private, "", public ] }, - { symbol: [ "ino_t", private, "", public ] }, - { symbol: [ "ino_t", private, "", public ] }, - { symbol: [ "ino_t", private, "", public ] }, - { symbol: [ "int8_t", private, "", public ] }, - { symbol: [ "int16_t", private, "", public ] }, - { symbol: [ "int32_t", private, "", public ] }, - { symbol: [ "int64_t", private, "", public ] }, - { symbol: [ "uint8_t", private, "", public ] }, - { symbol: [ "uint16_t", private, "", public ] }, - { symbol: [ "uint32_t", private, "", public ] }, - { symbol: [ "uint64_t", private, "", public ] }, - { symbol: [ "intptr_t", private, "", public ] }, - { symbol: [ "uintptr_t", private, "", public ] }, - { symbol: [ "iovec", private, "", public ] }, - { symbol: [ "iovec", private, "", private ] }, - { symbol: [ "itimerspec", private, "", public ] }, - { symbol: [ "itimerspec", private, "", public ] }, - { symbol: [ "key_t", private, "", public ] }, - { symbol: [ "key_t", private, "", public ] }, - { symbol: [ "lconv", private, "", public ] }, - { symbol: [ "ldiv_t", private, "", public ] }, - { symbol: [ "lldiv_t", private, "", public ] }, - { symbol: [ "max_align_t", private, "", public ] }, - { symbol: [ "mode_t", private, "", public ] }, - { symbol: [ "mode_t", private, "", public ] }, - { symbol: [ "mode_t", private, "", public ] }, - { symbol: [ "mode_t", private, "", public ] }, - { symbol: [ "mode_t", private, "", public ] }, - { symbol: [ "mode_t", private, "", public ] }, - { symbol: [ "mode_t", private, "", public ] }, - { symbol: [ "nlink_t", private, "", public ] }, - { symbol: [ "nlink_t", private, "", public ] }, - { symbol: [ "ntohl", private, "", private ] }, - { symbol: [ "ntohs", private, "", private ] }, - { symbol: [ "off64_t", private, "", public ] }, - { symbol: [ "off64_t", private, "", private ] }, - { symbol: [ "off_t", private, "", public ] }, - { symbol: [ "off_t", private, "", public ] }, - { symbol: [ "off_t", private, "", public ] }, - { symbol: [ "off_t", private, "", public ] }, - { symbol: [ "off_t", private, "", public ] }, - { symbol: [ "off_t", private, "", public ] }, - { symbol: [ "off_t", private, "", private ] }, - { symbol: [ "optarg", private, "", private ] }, - { symbol: [ "opterr", private, "", private ] }, - { symbol: [ "optind", private, "", private ] }, - { symbol: [ "optopt", private, "", private ] }, - { symbol: [ "pid_t", private, "", public ] }, - { symbol: [ "pid_t", private, "", public ] }, - { symbol: [ "pid_t", private, "", public ] }, - { symbol: [ "pid_t", private, "", public ] }, - { symbol: [ "pid_t", private, "", public ] }, - { symbol: [ "pid_t", private, "", public ] }, - { symbol: [ "pid_t", private, "", public ] }, - { symbol: [ "pid_t", private, "", public ] }, - { symbol: [ "pid_t", private, "", public ] }, - { symbol: [ "pid_t", private, "", private ] }, - { symbol: [ "pid_t", private, "", public ] }, - { symbol: [ "pid_t", private, "", private ] }, - { symbol: [ "pid_t", private, "", public ] }, - { symbol: [ "ptrdiff_t", private, "", public ] }, - { symbol: [ "regex_t", private, "", public ] }, - { symbol: [ "regmatch_t", private, "", public ] }, - { symbol: [ "regoff_t", private, "", public ] }, - { symbol: [ "sigevent", private, "", public ] }, - { symbol: [ "sigevent", private, "", public ] }, - { symbol: [ "sigevent", private, "", public ] }, - { symbol: [ "sigevent", private, "", public ] }, - { symbol: [ "siginfo_t", private, "", public ] }, - { symbol: [ "siginfo_t", private, "", public ] }, - { symbol: [ "sigset_t", private, "", public ] }, - { symbol: [ "sigset_t", private, "", public ] }, - { symbol: [ "sigset_t", private, "", public ] }, - { symbol: [ "sigval", private, "", public ] }, - { symbol: [ "sockaddr", private, "", private ] }, - { symbol: [ "socklen_t", private, "", private ] }, - { symbol: [ "socklen_t", private, "", private ] }, - { symbol: [ "ssize_t", private, "", public ] }, - { symbol: [ "ssize_t", private, "", public ] }, - { symbol: [ "ssize_t", private, "", public ] }, - { symbol: [ "ssize_t", private, "", public ] }, - { symbol: [ "ssize_t", private, "", public ] }, - { symbol: [ "ssize_t", private, "", public ] }, - { symbol: [ "ssize_t", private, "", private ] }, - { symbol: [ "ssize_t", private, "", public ] }, - { symbol: [ "ssize_t", private, "", private ] }, - { symbol: [ "stat", private, "", public ] }, - { symbol: [ "stat", private, "", public ] }, - { symbol: [ "suseconds_t", private, "", public ] }, - { symbol: [ "suseconds_t", private, "", public ] }, - { symbol: [ "suseconds_t", private, "", public ] }, - { symbol: [ "time_t", private, "", public ] }, - { symbol: [ "time_t", private, "", public ] }, - { symbol: [ "time_t", private, "", public ] }, - { symbol: [ "time_t", private, "", public ] }, - { symbol: [ "time_t", private, "", public ] }, - { symbol: [ "time_t", private, "", public ] }, - { symbol: [ "time_t", private, "", public ] }, - { symbol: [ "time_t", private, "", public ] }, - { symbol: [ "time_t", private, "", public ] }, - { symbol: [ "time_t", private, "", public ] }, - { symbol: [ "timer_t", private, "", public ] }, - { symbol: [ "timer_t", private, "", public ] }, - { symbol: [ "timespec", private, "", public ] }, - { symbol: [ "timespec", private, "", public ] }, - { symbol: [ "timespec", private, "", public ] }, - { symbol: [ "timespec", private, "", public ] }, - { symbol: [ "timespec", private, "", public ] }, - { symbol: [ "timespec", private, "", public ] }, - { symbol: [ "timespec", private, "", public ] }, - { symbol: [ "timeval", private, "", public ] }, - { symbol: [ "timeval", private, "", public ] }, - { symbol: [ "timeval", private, "", public ] }, - { symbol: [ "timeval", private, "", public ] }, - { symbol: [ "tm", private, "", public ] }, - { symbol: [ "u_char", private, "", public ] }, - { symbol: [ "u_char", private, "", public ] }, - { symbol: [ "uid_t", private, "", public ] }, - { symbol: [ "uid_t", private, "", public ] }, - { symbol: [ "uid_t", private, "", public ] }, - { symbol: [ "uid_t", private, "", public ] }, - { symbol: [ "uid_t", private, "", public ] }, - { symbol: [ "uid_t", private, "", public ] }, - { symbol: [ "uid_t", private, "", private ] }, - { symbol: [ "useconds_t", private, "", public ] }, - { symbol: [ "useconds_t", private, "", private ] }, - { symbol: [ "wchar_t", private, "", public ] }, - { symbol: [ "wchar_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", private ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", private ] }, - { symbol: [ "size_t", private, "", public ] }, - { symbol: [ "size_t", private, "", public ] }, - # Macros that can be defined in more than one file, don't have the - # same __foo_defined guard that other types do, so the grep above - # doesn't discover them. Until I figure out a better way, I just - # add them in by hand as I discover them. - { symbol: [ "EOF", private, "", public ] }, - { symbol: [ "EOF", private, "", public ] }, - { symbol: [ "FILE", private, "", public ] }, - { symbol: [ "MAP_POPULATE", private, "", public ] }, - { symbol: [ "MAP_POPULATE", private, "", public ] }, - { symbol: [ "MAP_STACK", private, "", public ] }, - { symbol: [ "MAP_STACK", private, "", public ] }, - { symbol: [ "MAXHOSTNAMELEN", private, "", public ] }, - { symbol: [ "MAXHOSTNAMELEN", private, "", public ] }, - { symbol: [ "SIGABRT", private, "", public ] }, - { symbol: [ "SIGCHLD", private, "", public ] }, - { symbol: [ "SIGCHLD", private, "", public ] }, - { symbol: [ "va_list", private, "", public ] }, - { symbol: [ "va_list", private, "", public ] }, - { symbol: [ "va_list", private, "", public ] }, - # These are symbols that could be defined in either stdlib.h or - # malloc.h, but we always want the stdlib location. - { symbol: [ "malloc", private, "", public ] }, - { symbol: [ "calloc", private, "", public ] }, - { symbol: [ "realloc", private, "", public ] }, - { symbol: [ "free", private, "", public ] }, - # Entries for NULL - { symbol: [ "NULL", private, "", public ] }, # 'canonical' location for NULL - { symbol: [ "NULL", private, "", public ] }, - { symbol: [ "NULL", private, "", public ] }, - { symbol: [ "NULL", private, "", public ] }, - { symbol: [ "NULL", private, "", public ] }, - { symbol: [ "NULL", private, "", public ] }, - { symbol: [ "NULL", private, "", public ] }, - { symbol: [ "NULL", private, "", public ] }, - { symbol: [ "NULL", private, "", public ] }, - { symbol: [ "NULL", private, "", public ] }, - { symbol: [ "NULL", private, "", public ] }, - { symbol: [ "NULL", private, "", public ] }, - { symbol: [ "NULL", private, "", public ] }, - { symbol: [ "NULL", private, "", private ] }, - { symbol: [ "NULL", private, "", public ] }, - - # Kludge time: almost all STL types take an allocator, but they - # almost always use the default value. Usually we detect that - # and don't try to do IWYU, but sometimes it passes through. - # For instance, when adding two strings, we end up calling - # template<_CharT,_Traits,_Alloc> ... operator+( - # basic_string<_CharT,_Traits,_Alloc>, ...) - # These look like normal template args to us, so we see they're - # used and declare an iwyu dependency, even though we don't need - # to #include the traits or alloc type ourselves. The surest way - # to deal with this is to just say that everyone provides - # std::allocator. We can add more here at need. - { symbol: [ "std::allocator", private, "", public ] }, - { symbol: [ "std::allocator", private, "", public ] }, - { symbol: [ "std::allocator", private, "", public ] }, - { symbol: [ "std::allocator", private, "", public ] }, - { symbol: [ "std::allocator", private, "", public ] }, - # A similar kludge for std::char_traits. basic_string, - # basic_ostream and basic_istream have this as a default template - # argument, and sometimes it bleeds through when clang desugars the - # string/ostream/istream type. - { symbol: [ "std::char_traits", private, "", public ] }, - { symbol: [ "std::char_traits", private, "", public ] }, - { symbol: [ "std::char_traits", private, "", public ] }, - - { symbol: [ "std::size_t", private, "", public ] }, - { symbol: [ "std::size_t", private, "", public ] }, - { symbol: [ "std::size_t", private, "", public ] }, - { symbol: [ "std::size_t", private, "", public ] }, - { symbol: [ "std::size_t", private, "", public ] }, - { symbol: [ "std::size_t", private, "", public ] }, - { symbol: [ "std::size_t", private, "", public ] } -] - -# vim: set ft=toml: diff --git a/cmake.config/iwyu/mapping.imp b/cmake.config/iwyu/mapping.imp index 465ab2118d..5ba6c56127 100644 --- a/cmake.config/iwyu/mapping.imp +++ b/cmake.config/iwyu/mapping.imp @@ -1,4 +1,7 @@ [ + { ref: "c99.imp" }, + { ref: "posix.imp" }, + # Generated to normal headers: header.h.generated.h -> nvim/header.h { include: [ '"api/autocmd.h.generated.h"', private, '"nvim/api/autocmd.h"', public ] }, { include: [ '"api/buffer.h.generated.h"', private, '"nvim/api/buffer.h"', public ] }, @@ -221,28 +224,19 @@ { include: [ '"nvim/tui/input_defs.h"', public, '"nvim/tui/input.h"', public ] }, { include: [ '"nvim/undo_defs.h"', public, '"nvim/undo.h"', public ] }, - # Third party headers - { include: [ "", private, "", public ] }, - { include: [ '', private, '', private ] }, - { include: [ '', private, '', private ] }, - { include: [ '', private, '', private ] }, - { include: [ '', private, '', private ] }, - { include: [ '', private, '', private ] }, - { include: [ '', private, '"nvim/gettext.h"', public ] }, - { include: [ '', private, '', private ] }, - { include: [ '', private, '', private ] }, - { include: [ '', private, '"nvim/os/unix_defs.h"', private ] }, - { include: [ '', private, '', private ] }, - { include: [ '', private, '"nvim/os/unix_defs.h"', private ] }, - { include: [ '', private, '"nvim/os/unix_defs.h"', private ] }, - { include: [ '', private, '', public ] }, - # Symbols { symbol: [ "MAX", private, '"nvim/macros.h"', public ] }, { symbol: [ "MIN", private, '"nvim/macros.h"', public ] }, - { symbol: [ "SEEK_END", private, '', public ] }, - { symbol: [ "SEEK_SET", private, '', public ] }, - { symbol: [ "time_fd", private, '"nvim/globals.h"', public ] }, + + # Third party headers + { include: [ '', public, '"nvim/gettext.h"', public ] }, + { include: [ '', public, '"nvim/os/unix_defs.h"', private ] }, + { include: [ '', public, '"nvim/os/unix_defs.h"', private ] }, + { include: [ '', public, '"nvim/os/unix_defs.h"', private ] }, + { include: [ '', public, '"nvim/os/unix_defs.h"', private ] }, + { include: [ '', public, '"nvim/os/unix_defs.h"', private ] }, + { include: [ '', public, '"nvim/os/unix_defs.h"', private ] }, + { include: [ '', public, '', public ] }, ] # vim: set ft=toml: diff --git a/cmake.config/iwyu/posix.imp b/cmake.config/iwyu/posix.imp new file mode 100644 index 0000000000..b15c1186d9 --- /dev/null +++ b/cmake.config/iwyu/posix.imp @@ -0,0 +1,110 @@ +[ + # bits/ioctls.h + { include: [ "", private, "", private ] }, + + # errno.h + { symbol: ["E2BIG", private, "", public ] }, + { symbol: ["EACCES", private, "", public ] }, + { symbol: ["EADDRINUSE", private, "", public ] }, + { symbol: ["EADDRNOTAVAIL", private, "", public ] }, + { symbol: ["EAFNOSUPPORT", private, "", public ] }, + { symbol: ["EAGAIN", private, "", public ] }, + { symbol: ["EALREADY", private, "", public ] }, + { symbol: ["EBADF", private, "", public ] }, + { symbol: ["EBADMSG", private, "", public ] }, + { symbol: ["EBUSY", private, "", public ] }, + { symbol: ["ECANCELED", private, "", public ] }, + { symbol: ["ECHILD", private, "", public ] }, + { symbol: ["ECONNABORTED", private, "", public ] }, + { symbol: ["ECONNREFUSED", private, "", public ] }, + { symbol: ["ECONNRESET", private, "", public ] }, + { symbol: ["EDEADLK", private, "", public ] }, + { symbol: ["EDESTADDRREQ", private, "", public ] }, + { symbol: ["EDOM", private, "", public ] }, + { symbol: ["EDQUOT", private, "", public ] }, + { symbol: ["EEXIST", private, "", public ] }, + { symbol: ["EFAULT", private, "", public ] }, + { symbol: ["EFBIG", private, "", public ] }, + { symbol: ["EHOSTUNREACH", private, "", public ] }, + { symbol: ["EIDRM", private, "", public ] }, + { symbol: ["EILSEQ", private, "", public ] }, + { symbol: ["EINPROGRESS", private, "", public ] }, + { symbol: ["EINTR", private, "", public ] }, + { symbol: ["EINVAL", private, "", public ] }, + { symbol: ["EIO", private, "", public ] }, + { symbol: ["EISCONN", private, "", public ] }, + { symbol: ["EISDIR", private, "", public ] }, + { symbol: ["ELOOP", private, "", public ] }, + { symbol: ["EMFILE", private, "", public ] }, + { symbol: ["EMLINK", private, "", public ] }, + { symbol: ["EMSGSIZE", private, "", public ] }, + { symbol: ["EMULTIHOP", private, "", public ] }, + { symbol: ["ENAMETOOLONG", private, "", public ] }, + { symbol: ["ENETDOWN", private, "", public ] }, + { symbol: ["ENETRESET", private, "", public ] }, + { symbol: ["ENETUNREACH", private, "", public ] }, + { symbol: ["ENFILE", private, "", public ] }, + { symbol: ["ENOBUFS", private, "", public ] }, + { symbol: ["ENODATA", private, "", public ] }, + { symbol: ["ENODEV", private, "", public ] }, + { symbol: ["ENOENT", private, "", public ] }, + { symbol: ["ENOEXEC", private, "", public ] }, + { symbol: ["ENOLCK", private, "", public ] }, + { symbol: ["ENOLINK", private, "", public ] }, + { symbol: ["ENOMEM", private, "", public ] }, + { symbol: ["ENOMSG", private, "", public ] }, + { symbol: ["ENOPROTOOPT", private, "", public ] }, + { symbol: ["ENOSPC", private, "", public ] }, + { symbol: ["ENOSR", private, "", public ] }, + { symbol: ["ENOSTR", private, "", public ] }, + { symbol: ["ENOSYS", private, "", public ] }, + { symbol: ["ENOTCONN", private, "", public ] }, + { symbol: ["ENOTDIR", private, "", public ] }, + { symbol: ["ENOTEMPTY", private, "", public ] }, + { symbol: ["ENOTRECOVERABLE", private, "", public ] }, + { symbol: ["ENOTSOCK", private, "", public ] }, + { symbol: ["ENOTSUP", private, "", public ] }, + { symbol: ["ENOTTY", private, "", public ] }, + { symbol: ["ENXIO", private, "", public ] }, + { symbol: ["EOPNOTSUPP", private, "", public ] }, + { symbol: ["EOVERFLOW", private, "", public ] }, + { symbol: ["EOWNERDEAD", private, "", public ] }, + { symbol: ["EPERM", private, "", public ] }, + { symbol: ["EPIPE", private, "", public ] }, + { symbol: ["EPROTO", private, "", public ] }, + { symbol: ["EPROTONOSUPPORT", private, "", public ] }, + { symbol: ["EPROTOTYPE", private, "", public ] }, + { symbol: ["ERANGE", private, "", public ] }, + { symbol: ["EROFS", private, "", public ] }, + { symbol: ["ESPIPE", private, "", public ] }, + { symbol: ["ESRCH", private, "", public ] }, + { symbol: ["ESTALE", private, "", public ] }, + { symbol: ["ETIME", private, "", public ] }, + { symbol: ["ETIMEDOUT", private, "", public ] }, + { symbol: ["ETXTBSY", private, "", public ] }, + { symbol: ["EWOULDBLOCK", private, "", public ] }, + { symbol: ["EXDEV", private, "", public ] }, + + # limits.h + { symbol: ["SSIZE_MAX", private, "", public ] }, + + # signal.h + { symbol: [ "sigset_t", private, "", public ] }, + + # sys/socket.h + { symbol: [ "iovec", private, "", public ] }, + { symbol: ["SOCK_STREAM", private, "", public ] }, + + # termios.h + { include: [ "", private, "", public ] }, + { include: [ "", private, "", public ] }, + { include: [ '', private, '', public ] }, + { include: [ '', private, '', public ] }, + { include: [ '', private, '', public ] }, + { include: [ '', private, '', public ] }, + + # ", public ] }, +] + +# vim: set ft=toml: diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index cf2ee9c6b5..59af5e3818 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -259,9 +259,7 @@ if(ENABLE_IWYU) set(iwyu_flags "${IWYU_PRG};") string(APPEND iwyu_flags "-Xiwyu;--no_default_mappings;") - string(APPEND iwyu_flags "-Xiwyu;--mapping_file=${PROJECT_SOURCE_DIR}/cmake.config/iwyu/mapping.imp;") - string(APPEND iwyu_flags "-Xiwyu;--mapping_file=${PROJECT_SOURCE_DIR}/cmake.config/iwyu/gcc.libc.imp;") - string(APPEND iwyu_flags "-Xiwyu;--mapping_file=${PROJECT_SOURCE_DIR}/cmake.config/iwyu/gcc.symbols.imp") + string(APPEND iwyu_flags "-Xiwyu;--mapping_file=${PROJECT_SOURCE_DIR}/cmake.config/iwyu/mapping.imp") set_target_properties(nvim PROPERTIES C_INCLUDE_WHAT_YOU_USE "${iwyu_flags}") target_compile_definitions(main_lib INTERFACE EXITFREE) diff --git a/src/nvim/api/deprecated.c b/src/nvim/api/deprecated.c index b4aa6fe99e..9ea0de4b89 100644 --- a/src/nvim/api/deprecated.c +++ b/src/nvim/api/deprecated.c @@ -13,6 +13,7 @@ #include "nvim/api/vimscript.h" #include "nvim/buffer_defs.h" #include "nvim/decoration.h" +#include "nvim/decoration_defs.h" #include "nvim/extmark.h" #include "nvim/globals.h" #include "nvim/highlight.h" @@ -21,7 +22,6 @@ #include "nvim/memory.h" #include "nvim/option.h" #include "nvim/pos.h" -#include "nvim/types.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/deprecated.c.generated.h" diff --git a/src/nvim/api/extmark.c b/src/nvim/api/extmark.c index 8a2cde8372..d2e387f478 100644 --- a/src/nvim/api/extmark.c +++ b/src/nvim/api/extmark.c @@ -13,6 +13,7 @@ #include "nvim/buffer_defs.h" #include "nvim/charset.h" #include "nvim/decoration.h" +#include "nvim/decoration_defs.h" #include "nvim/decoration_provider.h" #include "nvim/drawscreen.h" #include "nvim/extmark.h" @@ -23,8 +24,6 @@ #include "nvim/memory.h" #include "nvim/pos.h" #include "nvim/sign.h" -#include "nvim/strings.h" -#include "nvim/vim.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/extmark.c.generated.h" diff --git a/src/nvim/api/win_config.c b/src/nvim/api/win_config.c index 4b16e26103..a35ad57d8f 100644 --- a/src/nvim/api/win_config.c +++ b/src/nvim/api/win_config.c @@ -11,8 +11,8 @@ #include "nvim/autocmd.h" #include "nvim/buffer_defs.h" #include "nvim/decoration.h" +#include "nvim/decoration_defs.h" #include "nvim/drawscreen.h" -#include "nvim/extmark_defs.h" #include "nvim/globals.h" #include "nvim/grid.h" #include "nvim/highlight_group.h" diff --git a/src/nvim/change.c b/src/nvim/change.c index aa58779f5b..f9eeab38c8 100644 --- a/src/nvim/change.c +++ b/src/nvim/change.c @@ -23,7 +23,6 @@ #include "nvim/fold.h" #include "nvim/gettext.h" #include "nvim/globals.h" -#include "nvim/grid_defs.h" #include "nvim/highlight_defs.h" #include "nvim/indent.h" #include "nvim/indent_c.h" diff --git a/src/nvim/charset.c b/src/nvim/charset.c index 9a7de8ecef..d3312516c6 100644 --- a/src/nvim/charset.c +++ b/src/nvim/charset.c @@ -19,7 +19,6 @@ #include "nvim/eval/typval_defs.h" #include "nvim/garray.h" #include "nvim/globals.h" -#include "nvim/grid_defs.h" #include "nvim/keycodes.h" #include "nvim/macros.h" #include "nvim/mbyte.h" diff --git a/src/nvim/decoration.c b/src/nvim/decoration.c index 43b07501a0..f860b65c93 100644 --- a/src/nvim/decoration.c +++ b/src/nvim/decoration.c @@ -1,7 +1,13 @@ #include #include +#include +#include +#include #include "nvim/api/extmark.h" +#include "nvim/api/private/defs.h" +#include "nvim/api/private/helpers.h" +#include "nvim/ascii.h" #include "nvim/buffer.h" #include "nvim/decoration.h" #include "nvim/drawscreen.h" @@ -9,8 +15,10 @@ #include "nvim/fold.h" #include "nvim/highlight.h" #include "nvim/highlight_group.h" +#include "nvim/mbyte.h" #include "nvim/memory.h" #include "nvim/move.h" +#include "nvim/option_vars.h" #include "nvim/pos.h" #include "nvim/sign.h" diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c index 6f34767907..0d405622b6 100644 --- a/src/nvim/drawline.c +++ b/src/nvim/drawline.c @@ -15,12 +15,12 @@ #include "nvim/cursor.h" #include "nvim/cursor_shape.h" #include "nvim/decoration.h" +#include "nvim/decoration_defs.h" #include "nvim/decoration_provider.h" #include "nvim/diff.h" #include "nvim/drawline.h" #include "nvim/drawscreen.h" #include "nvim/eval.h" -#include "nvim/extmark_defs.h" #include "nvim/fold.h" #include "nvim/globals.h" #include "nvim/grid.h" diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c index b28c279163..c6fd186ef2 100644 --- a/src/nvim/drawscreen.c +++ b/src/nvim/drawscreen.c @@ -68,6 +68,7 @@ #include "nvim/cmdexpand.h" #include "nvim/cursor.h" #include "nvim/decoration.h" +#include "nvim/decoration_defs.h" #include "nvim/decoration_provider.h" #include "nvim/diff.h" #include "nvim/digraph.h" @@ -75,7 +76,6 @@ #include "nvim/drawscreen.h" #include "nvim/eval.h" #include "nvim/ex_getln.h" -#include "nvim/extmark_defs.h" #include "nvim/fold.h" #include "nvim/getchar.h" #include "nvim/gettext.h" @@ -99,6 +99,7 @@ #include "nvim/profile.h" #include "nvim/regexp.h" #include "nvim/search.h" +#include "nvim/sign_defs.h" #include "nvim/spell.h" #include "nvim/state.h" #include "nvim/statusline.h" diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index c370224476..2e9dce8b5b 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -8,11 +8,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include diff --git a/src/nvim/eval/vars.c b/src/nvim/eval/vars.c index 3fd33720c9..cf02bbe224 100644 --- a/src/nvim/eval/vars.c +++ b/src/nvim/eval/vars.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "nvim/ascii.h" #include "nvim/autocmd.h" diff --git a/src/nvim/event/libuv_process.c b/src/nvim/event/libuv_process.c index 13d954b92d..2f21fcf2ac 100644 --- a/src/nvim/event/libuv_process.c +++ b/src/nvim/event/libuv_process.c @@ -1,4 +1,5 @@ #include +#include #include #include diff --git a/src/nvim/event/loop.h b/src/nvim/event/loop.h index 977ed8a1ee..5665332e95 100644 --- a/src/nvim/event/loop.h +++ b/src/nvim/event/loop.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include diff --git a/src/nvim/event/multiqueue.c b/src/nvim/event/multiqueue.c index 328fa68806..677b7e8e6a 100644 --- a/src/nvim/event/multiqueue.c +++ b/src/nvim/event/multiqueue.c @@ -45,7 +45,6 @@ #include #include #include -#include #include "nvim/event/defs.h" #include "nvim/event/multiqueue.h" diff --git a/src/nvim/event/rstream.c b/src/nvim/event/rstream.c index 4721bbdcb7..218293e44a 100644 --- a/src/nvim/event/rstream.c +++ b/src/nvim/event/rstream.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include "nvim/event/loop.h" diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index c406364491..324364a297 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -46,7 +47,6 @@ #include "nvim/getchar.h" #include "nvim/gettext.h" #include "nvim/globals.h" -#include "nvim/grid_defs.h" #include "nvim/help.h" #include "nvim/highlight_defs.h" #include "nvim/highlight_group.h" diff --git a/src/nvim/extmark.c b/src/nvim/extmark.c index 08a1539bfc..7bfa7ae62f 100644 --- a/src/nvim/extmark.c +++ b/src/nvim/extmark.c @@ -28,17 +28,16 @@ #include #include "nvim/api/private/defs.h" -#include "nvim/api/private/helpers.h" #include "nvim/buffer_defs.h" #include "nvim/buffer_updates.h" #include "nvim/decoration.h" +#include "nvim/decoration_defs.h" #include "nvim/extmark.h" #include "nvim/extmark_defs.h" #include "nvim/globals.h" #include "nvim/map.h" #include "nvim/marktree.h" #include "nvim/memline.h" -#include "nvim/memory.h" #include "nvim/pos.h" #include "nvim/undo.h" diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 5bf3410614..fce2ddc211 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "auto/config.h" diff --git a/src/nvim/fold.c b/src/nvim/fold.c index 4c596d9d96..477e4a20cd 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -20,6 +20,7 @@ #include "nvim/charset.h" #include "nvim/cursor.h" #include "nvim/decoration.h" +#include "nvim/decoration_defs.h" #include "nvim/diff.h" #include "nvim/drawscreen.h" #include "nvim/eval.h" diff --git a/src/nvim/input.c b/src/nvim/input.c index d6ade22fdb..d3ac180ffc 100644 --- a/src/nvim/input.c +++ b/src/nvim/input.c @@ -1,6 +1,7 @@ // input.c: high level functions for prompting the user or input // like yes/no or number prompts. +#include #include #include #include diff --git a/src/nvim/lua/stdlib.c b/src/nvim/lua/stdlib.c index a200b0a32f..c1e0af5aa1 100644 --- a/src/nvim/lua/stdlib.c +++ b/src/nvim/lua/stdlib.c @@ -5,8 +5,8 @@ #include #include #include +#include #include -#include #ifdef NVIM_VENDOR_BIT # include "bit.h" diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index 92eddb3cf1..37764498c8 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -62,7 +62,6 @@ #include "nvim/option_vars.h" #include "nvim/optionstr.h" #include "nvim/os/os.h" -#include "nvim/os/os_defs.h" #include "nvim/pos.h" #include "nvim/strings.h" #include "nvim/types.h" diff --git a/src/nvim/move.c b/src/nvim/move.c index a719386084..6724ded9d8 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -17,7 +17,6 @@ #include "nvim/buffer.h" #include "nvim/cursor.h" #include "nvim/diff.h" -#include "nvim/drawline.h" #include "nvim/drawscreen.h" #include "nvim/edit.h" #include "nvim/eval/typval.h" @@ -41,6 +40,7 @@ #include "nvim/popupmenu.h" #include "nvim/pos.h" #include "nvim/search.h" +#include "nvim/sign_defs.h" #include "nvim/strings.h" #include "nvim/types.h" #include "nvim/vim.h" diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c index 21803be226..382fdca8fa 100644 --- a/src/nvim/msgpack_rpc/channel.c +++ b/src/nvim/msgpack_rpc/channel.c @@ -7,7 +7,6 @@ #include #include #include -#include #include "klib/kvec.h" #include "nvim/api/private/defs.h" diff --git a/src/nvim/option.c b/src/nvim/option.c index 0fae498b25..d4e8328ddd 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -52,7 +52,6 @@ #include "nvim/garray.h" #include "nvim/gettext.h" #include "nvim/globals.h" -#include "nvim/grid_defs.h" #include "nvim/highlight.h" #include "nvim/highlight_group.h" #include "nvim/indent.h" diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index e2a6136ab4..82916eca7b 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #ifdef MSWIN diff --git a/src/nvim/os/unix_defs.h b/src/nvim/os/unix_defs.h index 42d649d773..b90e306932 100644 --- a/src/nvim/os/unix_defs.h +++ b/src/nvim/os/unix_defs.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #if defined(HAVE_TERMIOS_H) # include diff --git a/src/nvim/plines.c b/src/nvim/plines.c index acbb9637a4..7f6472ab42 100644 --- a/src/nvim/plines.c +++ b/src/nvim/plines.c @@ -8,6 +8,7 @@ #include "nvim/ascii.h" #include "nvim/charset.h" #include "nvim/decoration.h" +#include "nvim/decoration_defs.h" #include "nvim/diff.h" #include "nvim/fold.h" #include "nvim/globals.h" diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index f91d0cabdb..496b93106d 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -24,7 +24,6 @@ #include "nvim/garray.h" #include "nvim/gettext.h" #include "nvim/globals.h" -#include "nvim/grid_defs.h" #include "nvim/keycodes.h" #include "nvim/macros.h" #include "nvim/mark.h" diff --git a/src/nvim/sign.c b/src/nvim/sign.c index 243e9e57cf..af7b2ca5df 100644 --- a/src/nvim/sign.c +++ b/src/nvim/sign.c @@ -1,18 +1,24 @@ // sign.c: functions for managing with signs +#include #include #include #include #include #include +#include "klib/kvec.h" #include "nvim/api/extmark.h" +#include "nvim/api/private/defs.h" +#include "nvim/api/private/helpers.h" #include "nvim/ascii.h" #include "nvim/buffer.h" #include "nvim/buffer_defs.h" #include "nvim/charset.h" #include "nvim/cmdexpand_defs.h" #include "nvim/cursor.h" +#include "nvim/decoration.h" +#include "nvim/decoration_defs.h" #include "nvim/drawscreen.h" #include "nvim/edit.h" #include "nvim/eval/funcs.h" @@ -26,6 +32,8 @@ #include "nvim/highlight_defs.h" #include "nvim/highlight_group.h" #include "nvim/macros.h" +#include "nvim/map.h" +#include "nvim/marktree.h" #include "nvim/mbyte.h" #include "nvim/memory.h" #include "nvim/message.h" diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c index 9d34cf926f..92856d6d8c 100644 --- a/src/nvim/tui/input.c +++ b/src/nvim/tui/input.c @@ -2,7 +2,6 @@ #include #include #include -#include #include "klib/kvec.h" #include "nvim/api/private/defs.h" diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index 323227d4c0..4bbdea8def 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -34,6 +34,7 @@ #include "nvim/tui/tui.h" #include "nvim/types.h" #include "nvim/ugrid.h" +#include "nvim/ui.h" #include "nvim/ui_client.h" #ifdef MSWIN