mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +00:00
build: allow IWYU to fix includes for all .c files
Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
This commit is contained in:
@@ -1,36 +1,42 @@
|
||||
// This is an open source non-commercial project. Dear PVS-Studio, please check
|
||||
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <msgpack.h>
|
||||
#include <msgpack/object.h>
|
||||
#include <msgpack/pack.h>
|
||||
#include <msgpack/sbuffer.h>
|
||||
#include <msgpack/unpack.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <uv.h>
|
||||
|
||||
#include "klib/kvec.h"
|
||||
#include "nvim/api/private/defs.h"
|
||||
#include "nvim/api/private/dispatch.h"
|
||||
#include "nvim/api/private/helpers.h"
|
||||
#include "nvim/api/ui.h"
|
||||
#include "nvim/api/vim.h"
|
||||
#include "nvim/ascii.h"
|
||||
#include "nvim/channel.h"
|
||||
#include "nvim/eval.h"
|
||||
#include "nvim/event/libuv_process.h"
|
||||
#include "nvim/event/defs.h"
|
||||
#include "nvim/event/loop.h"
|
||||
#include "nvim/event/rstream.h"
|
||||
#include "nvim/event/socket.h"
|
||||
#include "nvim/event/stream.h"
|
||||
#include "nvim/event/wstream.h"
|
||||
#include "nvim/globals.h"
|
||||
#include "nvim/log.h"
|
||||
#include "nvim/main.h"
|
||||
#include "nvim/map.h"
|
||||
#include "nvim/memory.h"
|
||||
#include "nvim/message.h"
|
||||
#include "nvim/msgpack_rpc/channel.h"
|
||||
#include "nvim/msgpack_rpc/channel_defs.h"
|
||||
#include "nvim/msgpack_rpc/helpers.h"
|
||||
#include "nvim/msgpack_rpc/unpacker.h"
|
||||
#include "nvim/os/input.h"
|
||||
#include "nvim/os_unix.h"
|
||||
#include "nvim/rbuffer.h"
|
||||
#include "nvim/types.h"
|
||||
#include "nvim/ui.h"
|
||||
#include "nvim/vim.h"
|
||||
#include "nvim/ui_client.h"
|
||||
|
||||
#if MIN_LOG_LEVEL > LOGLVL_DBG
|
||||
# define log_client_msg(...)
|
||||
|
@@ -6,8 +6,10 @@
|
||||
|
||||
#include "nvim/api/private/defs.h"
|
||||
#include "nvim/channel.h"
|
||||
#include "nvim/event/multiqueue.h"
|
||||
#include "nvim/event/process.h"
|
||||
#include "nvim/event/socket.h"
|
||||
#include "nvim/macros.h"
|
||||
#include "nvim/vim.h"
|
||||
|
||||
#define METHOD_MAXLEN 512
|
||||
|
@@ -1,21 +1,25 @@
|
||||
// This is an open source non-commercial project. Dear PVS-Studio, please check
|
||||
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <msgpack.h>
|
||||
#include <msgpack/object.h>
|
||||
#include <msgpack/sbuffer.h>
|
||||
#include <msgpack/unpack.h>
|
||||
#include <msgpack/zone.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "klib/kvec.h"
|
||||
#include "nvim/api/private/dispatch.h"
|
||||
#include "msgpack/pack.h"
|
||||
#include "nvim/api/private/helpers.h"
|
||||
#include "nvim/assert.h"
|
||||
#include "nvim/log.h"
|
||||
#include "nvim/event/wstream.h"
|
||||
#include "nvim/memory.h"
|
||||
#include "nvim/msgpack_rpc/helpers.h"
|
||||
#include "nvim/vim.h"
|
||||
#include "nvim/types.h"
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "keysets.generated.h"
|
||||
# include "keysets.generated.h" // IWYU pragma: export
|
||||
# include "msgpack_rpc/helpers.c.generated.h"
|
||||
#endif
|
||||
|
||||
|
@@ -1,25 +1,22 @@
|
||||
// This is an open source non-commercial project. Dear PVS-Studio, please check
|
||||
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <uv.h>
|
||||
|
||||
#include "nvim/ascii.h"
|
||||
#include "nvim/channel.h"
|
||||
#include "nvim/eval.h"
|
||||
#include "nvim/event/socket.h"
|
||||
#include "nvim/fileio.h"
|
||||
#include "nvim/garray.h"
|
||||
#include "nvim/log.h"
|
||||
#include "nvim/main.h"
|
||||
#include "nvim/memory.h"
|
||||
#include "nvim/msgpack_rpc/channel.h"
|
||||
#include "nvim/msgpack_rpc/server.h"
|
||||
#include "nvim/os/os.h"
|
||||
#include "nvim/path.h"
|
||||
#include "nvim/strings.h"
|
||||
#include "nvim/vim.h"
|
||||
#include "nvim/os/stdpaths_defs.h"
|
||||
|
||||
#define MAX_CONNECTIONS 32
|
||||
#define ENV_LISTEN "NVIM_LISTEN_ADDRESS" // deprecated
|
||||
|
@@ -1,9 +1,17 @@
|
||||
// This is an open source non-commercial project. Dear PVS-Studio, please check
|
||||
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "klib/kvec.h"
|
||||
#include "mpack/conv.h"
|
||||
#include "nvim/api/private/helpers.h"
|
||||
#include "nvim/log.h"
|
||||
#include "nvim/ascii.h"
|
||||
#include "nvim/macros.h"
|
||||
#include "nvim/memory.h"
|
||||
#include "nvim/msgpack_rpc/channel_defs.h"
|
||||
#include "nvim/msgpack_rpc/helpers.h"
|
||||
#include "nvim/msgpack_rpc/unpacker.h"
|
||||
#include "nvim/ui_client.h"
|
||||
|
@@ -7,10 +7,14 @@
|
||||
|
||||
#include "mpack/mpack_core.h"
|
||||
#include "mpack/object.h"
|
||||
#include "nvim/api/private/defs.h"
|
||||
#include "nvim/api/private/dispatch.h"
|
||||
#include "nvim/api/private/helpers.h"
|
||||
#include "nvim/grid_defs.h"
|
||||
#include "nvim/memory.h"
|
||||
#include "nvim/msgpack_rpc/channel_defs.h"
|
||||
#include "nvim/types.h"
|
||||
#include "nvim/ui_client.h"
|
||||
|
||||
struct Unpacker {
|
||||
mpack_parser_t parser;
|
||||
|
Reference in New Issue
Block a user