From 66360675cf4d091b7460e4a8e1435c13216c1929 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 11 Sep 2022 17:12:44 +0200 Subject: 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. --- src/nvim/spellfile.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'src/nvim/spellfile.c') diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c index d483863fa8..395051453a 100644 --- a/src/nvim/spellfile.c +++ b/src/nvim/spellfile.c @@ -226,34 +226,52 @@ // stored as an offset to the previous number in as // few bytes as possible, see offset2bytes()) -#include +#include +#include +#include +#include +#include #include -#include +#include +#include +#include +#include "auto/config.h" #include "nvim/arglist.h" #include "nvim/ascii.h" #include "nvim/buffer.h" #include "nvim/charset.h" #include "nvim/drawscreen.h" -#include "nvim/ex_cmds2.h" +#include "nvim/ex_cmds_defs.h" #include "nvim/fileio.h" +#include "nvim/garray.h" +#include "nvim/gettext.h" +#include "nvim/globals.h" +#include "nvim/hashtab.h" +#include "nvim/macros.h" +#include "nvim/mbyte.h" #include "nvim/memline.h" #include "nvim/memory.h" +#include "nvim/message.h" #include "nvim/option.h" #include "nvim/os/input.h" #include "nvim/os/os.h" +#include "nvim/os/time.h" #include "nvim/path.h" +#include "nvim/pos.h" #include "nvim/regexp.h" #include "nvim/runtime.h" #include "nvim/spell.h" #include "nvim/spell_defs.h" #include "nvim/spellfile.h" +#include "nvim/strings.h" +#include "nvim/types.h" #include "nvim/ui.h" #include "nvim/undo.h" #include "nvim/vim.h" #ifndef UNIX // it's in os/unix_defs.h for Unix -# include // for time_t +# include #endif // Special byte values for . Some are only used in the tree for -- cgit