neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit e38a05369293293b5b510b1b0014fcc2e7cb87f4
parent f4aedbae4cb1f206f5b7c6142697b71dd473059b
Author: dundargoc <gocdundar@gmail.com>
Date:   Mon, 27 Nov 2023 18:46:03 +0100

build(IWYU): export generated headers

Diffstat:
Mcmake.config/iwyu/mapping.imp | 16+---------------
Msrc/nvim/api/autocmd.c | 1+
Msrc/nvim/api/extmark.c | 1+
Msrc/nvim/api/options.c | 1+
Msrc/nvim/api/private/dispatch.h | 2+-
Msrc/nvim/api/ui.h | 2+-
Msrc/nvim/api/win_config.c | 1+
Msrc/nvim/api/window.c | 1+
Msrc/nvim/highlight_group.c | 1+
Msrc/nvim/mapping.c | 1+
Msrc/nvim/os/os.h | 2++
Msrc/nvim/ui.h | 2+-
Msrc/nvim/ui_client.h | 2+-
13 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/cmake.config/iwyu/mapping.imp b/cmake.config/iwyu/mapping.imp @@ -2,19 +2,6 @@ { ref: "c99.imp" }, { ref: "posix.imp" }, - # Generated to normal headers with a different name: header.h.generated.h -> nvim/some_other_header.h - { include: [ '"api/private/dispatch_wrappers.h.generated.h"', private, '"nvim/api/private/dispatch.h"', public ] }, - { include: [ '"keysets.h.generated.h"', private, '"nvim/api/private/helpers.h"', public ] }, - { include: [ '"keysets_defs.generated.h"', private, '"nvim/api/private/defs.h"', public ] }, - { include: [ '"os/env.h.generated.h"', private, '"nvim/os/os.h"', public ] }, - { include: [ '"os/mem.h.generated.h"', private, '"nvim/os/os.h"', public ] }, - { include: [ '"os/stdpaths.h.generated.h"', private, '"nvim/os/os.h"', public ] }, - { include: [ '"os/users.h.generated.h"', private, '"nvim/os/os.h"', public ] }, - { include: [ '"ui_events_call.h.generated.h"', private, '"nvim/ui.h"', public ] }, - { include: [ '"ui_events_client.h.generated.h"', private, '"nvim/ui_client.h"', public ] }, - { include: [ '"ui_events_remote.h.generated.h"', private, '"nvim/api/ui.h"', public ] }, - - # Symbols { symbol: [ "FUNC_ATTR_ALLOC_ALIGN", private, '"nvim/func_attr.h"', public ] }, { symbol: [ "FUNC_ATTR_ALLOC_SIZE", private, '"nvim/func_attr.h"', public ] }, { symbol: [ "FUNC_ATTR_ALLOC_SIZE_PROD", private, '"nvim/func_attr.h"', public ] }, @@ -31,13 +18,12 @@ { symbol: [ "FUNC_ATTR_PURE", private, '"nvim/func_attr.h"', public ] }, { symbol: [ "FUNC_ATTR_UNUSED", private, '"nvim/func_attr.h"', public ] }, { symbol: [ "FUNC_ATTR_WARN_UNUSED_RESULT", private, '"nvim/func_attr.h"', public ] }, - { symbol: [ "MAX", private, '"nvim/macros.h"', public ] }, { symbol: [ "MIN", private, '"nvim/macros.h"', public ] }, { symbol: [ "extern_proc", private, '<uv.h>', public ] }, { symbol: [ "iovec", private, '<sys/uio.h>', public ] }, - # Third party headers + { include: [ '"keysets_defs.generated.h"', private, '"nvim/api/private/dispatch.h"', public ] }, { include: [ '<uv/unix.h>', private, '<uv.h>', public ] }, ] diff --git a/src/nvim/api/autocmd.c b/src/nvim/api/autocmd.c @@ -10,6 +10,7 @@ #include "nvim/api/autocmd.h" #include "nvim/api/keysets.h" #include "nvim/api/private/defs.h" +#include "nvim/api/private/dispatch.h" #include "nvim/api/private/helpers.h" #include "nvim/api/private/validate.h" #include "nvim/autocmd.h" diff --git a/src/nvim/api/extmark.c b/src/nvim/api/extmark.c @@ -8,6 +8,7 @@ #include "nvim/api/extmark.h" #include "nvim/api/keysets.h" #include "nvim/api/private/defs.h" +#include "nvim/api/private/dispatch.h" #include "nvim/api/private/helpers.h" #include "nvim/api/private/validate.h" #include "nvim/buffer_defs.h" diff --git a/src/nvim/api/options.c b/src/nvim/api/options.c @@ -5,6 +5,7 @@ #include "nvim/api/keysets.h" #include "nvim/api/options.h" #include "nvim/api/private/defs.h" +#include "nvim/api/private/dispatch.h" #include "nvim/api/private/helpers.h" #include "nvim/api/private/validate.h" #include "nvim/autocmd.h" diff --git a/src/nvim/api/private/dispatch.h b/src/nvim/api/private/dispatch.h @@ -26,6 +26,6 @@ extern const MsgpackRpcRequestHandler method_handlers[]; #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/private/dispatch.h.generated.h" -# include "api/private/dispatch_wrappers.h.generated.h" +# include "api/private/dispatch_wrappers.h.generated.h" // IWYU pragma: export # include "keysets_defs.generated.h" #endif diff --git a/src/nvim/api/ui.h b/src/nvim/api/ui.h @@ -10,5 +10,5 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/ui.h.generated.h" -# include "ui_events_remote.h.generated.h" +# include "ui_events_remote.h.generated.h" // IWYU pragma: export #endif diff --git a/src/nvim/api/win_config.c b/src/nvim/api/win_config.c @@ -5,6 +5,7 @@ #include "nvim/api/extmark.h" #include "nvim/api/keysets.h" #include "nvim/api/private/defs.h" +#include "nvim/api/private/dispatch.h" #include "nvim/api/private/helpers.h" #include "nvim/api/win_config.h" #include "nvim/ascii.h" diff --git a/src/nvim/api/window.c b/src/nvim/api/window.c @@ -5,6 +5,7 @@ #include "nvim/api/keysets.h" #include "nvim/api/private/defs.h" +#include "nvim/api/private/dispatch.h" #include "nvim/api/private/helpers.h" #include "nvim/api/private/validate.h" #include "nvim/api/window.h" diff --git a/src/nvim/highlight_group.c b/src/nvim/highlight_group.c @@ -10,6 +10,7 @@ #include "klib/kvec.h" #include "nvim/api/keysets.h" #include "nvim/api/private/defs.h" +#include "nvim/api/private/dispatch.h" #include "nvim/api/private/helpers.h" #include "nvim/api/private/validate.h" #include "nvim/ascii.h" diff --git a/src/nvim/mapping.c b/src/nvim/mapping.c @@ -13,6 +13,7 @@ #include "nvim/api/keysets.h" #include "nvim/api/private/converter.h" #include "nvim/api/private/defs.h" +#include "nvim/api/private/dispatch.h" #include "nvim/api/private/helpers.h" #include "nvim/ascii.h" #include "nvim/buffer_defs.h" diff --git a/src/nvim/os/os.h b/src/nvim/os/os.h @@ -11,10 +11,12 @@ #include "nvim/os/stdpaths_defs.h" // IWYU pragma: keep #ifdef INCLUDE_GENERATED_DECLARATIONS +// IWYU pragma: begin_exports # include "os/env.h.generated.h" # include "os/mem.h.generated.h" # include "os/stdpaths.h.generated.h" # include "os/users.h.generated.h" +// IWYU pragma: end_exports #endif #define ENV_LOGFILE "NVIM_LOG_FILE" diff --git a/src/nvim/ui.h b/src/nvim/ui.h @@ -122,7 +122,7 @@ typedef struct ui_event_callback { // uncrustify:off #ifdef INCLUDE_GENERATED_DECLARATIONS # include "ui.h.generated.h" -# include "ui_events_call.h.generated.h" +# include "ui_events_call.h.generated.h" // IWYU pragma: export #endif // uncrustify:on diff --git a/src/nvim/ui_client.h b/src/nvim/ui_client.h @@ -39,6 +39,6 @@ EXTERN bool ui_client_forward_stdin INIT( = false); // uncrustify:off #ifdef INCLUDE_GENERATED_DECLARATIONS # include "ui_client.h.generated.h" -# include "ui_events_client.h.generated.h" +# include "ui_events_client.h.generated.h" // IWYU pragma: export #endif // uncrustify:on