diff options
author | ZyX <kp-pav@yandex.ru> | 2016-09-11 03:54:13 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-03-29 10:08:06 +0300 |
commit | a32db8ed19c35847373d4a7fd56d7797a5a26897 (patch) | |
tree | f6b925b48e7d677f3bb8c429516371633884e53a /src/nvim/eval/typval.c | |
parent | 2ad4fba46db26d0724106b194f7cb628fb9b02e8 (diff) | |
download | rneovim-a32db8ed19c35847373d4a7fd56d7797a5a26897.tar.gz rneovim-a32db8ed19c35847373d4a7fd56d7797a5a26897.tar.bz2 rneovim-a32db8ed19c35847373d4a7fd56d7797a5a26897.zip |
eval/typval: Add missing includes, also add a script to find them
Contains unfinished attempt to integrate IWYU (ref #549). To finish it different
job should be done, specifically:
- Instead of feeding IWYU with modified file a mirror source tree should be
created with the help of CMake which will contain modified sources. This
solves the problem with IWYU thinking that `*.generated.h` headers should be
included in place of `*` headers.
- Build IWYU as all other third-party utilities.
- Make modified sources avoid problems with `nvim/func_attr.h` includes and
various related tricks.
Current script may only be used for manual checks like this:
./scripts/check-includes.py \
--generated-includes-dir build/include \
--generated-includes-dir build/src/nvim/auto \
--file src/nvim/eval/typval.c \
-- -Isrc -Ibuild/include -Ibuild/src/nvim/auto \
-DINCLUDE_GENERATED_DECLARATIONS
(it is also somewhat fine with `--file src/nvim/eval/typval.h`). I have no idea
why (I mean, why developer think that these lines are needed, why they are
suggested is pretty obvious: because there is typedef which mentions them before
structs are defined), but for typval.h it reports, among other things, that it
should add lines
struct dictvar_S;
struct listitem_S;
struct listvar_S;
struct listwatch_S;
Diffstat (limited to 'src/nvim/eval/typval.c')
-rw-r--r-- | src/nvim/eval/typval.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index 8a407a4513..4777e00a76 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -20,6 +20,11 @@ #include "nvim/ascii.h" #include "nvim/pos.h" #include "nvim/charset.h" +#include "nvim/garray.h" +#include "nvim/gettext.h" +#include "nvim/macros.h" +#include "nvim/mbyte.h" +#include "nvim/message.h" // TODO(ZyX-I): Move line_breakcheck out of misc1 #include "nvim/misc1.h" // For line_breakcheck |