mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 22:36:09 +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:
@@ -4,14 +4,14 @@
|
||||
#include <assert.h>
|
||||
#include <lauxlib.h>
|
||||
#include <lua.h>
|
||||
#include <lualib.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "nvim/api/private/defs.h"
|
||||
#include "nvim/api/private/helpers.h"
|
||||
#include "nvim/assert.h"
|
||||
#include "nvim/func_attr.h"
|
||||
#include "nvim/memory.h"
|
||||
// FIXME: vim.h is not actually needed, but otherwise it states MAXPATHL is
|
||||
// redefined
|
||||
@@ -19,12 +19,16 @@
|
||||
#include "nvim/ascii.h"
|
||||
#include "nvim/eval/decode.h"
|
||||
#include "nvim/eval/typval.h"
|
||||
#include "nvim/eval/typval_defs.h"
|
||||
#include "nvim/eval/typval_encode.h"
|
||||
#include "nvim/eval/userfunc.h"
|
||||
#include "nvim/globals.h"
|
||||
#include "nvim/garray.h"
|
||||
#include "nvim/gettext.h"
|
||||
#include "nvim/lua/converter.h"
|
||||
#include "nvim/lua/executor.h"
|
||||
#include "nvim/macros.h"
|
||||
#include "nvim/message.h"
|
||||
#include "nvim/types.h"
|
||||
#include "nvim/vim.h"
|
||||
|
||||
/// Determine, which keys lua table contains
|
||||
@@ -565,6 +569,7 @@ static bool typval_conv_special = false;
|
||||
#define TYPVAL_ENCODE_FIRST_ARG_TYPE lua_State *const
|
||||
#define TYPVAL_ENCODE_FIRST_ARG_NAME lstate
|
||||
#include "nvim/eval/typval_encode.c.h"
|
||||
|
||||
#undef TYPVAL_ENCODE_SCOPE
|
||||
#undef TYPVAL_ENCODE_NAME
|
||||
#undef TYPVAL_ENCODE_FIRST_ARG_TYPE
|
||||
|
Reference in New Issue
Block a user