refactor(IWYU): fix headers

Remove `export` pramgas from defs headers as it causes IWYU to believe
that the definitions from the defs headers comes from main header, which
is not what we really want.
This commit is contained in:
dundargoc
2024-01-04 15:38:16 +01:00
committed by dundargoc
parent 1514982484
commit 1813661a61
246 changed files with 1136 additions and 635 deletions

View File

@@ -1,15 +1,12 @@
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <sys/types.h> // IWYU pragma: keep
#include <uv.h> // IWYU pragma: keep
#include "nvim/cmdexpand_defs.h" // IWYU pragma: keep
#include "nvim/eval/typval_defs.h" // IWYU pragma: keep
#include "nvim/func_attr.h"
#include "nvim/mbyte_defs.h" // IWYU pragma: export
#include "nvim/mbyte_defs.h" // IWYU pragma: keep
#include "nvim/types_defs.h" // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
@@ -27,18 +24,6 @@ extern const uint8_t utf8len_tab_zero[256];
extern const uint8_t utf8len_tab[256];
static inline int mb_strcmp_ic(bool ic, const char *s1, const char *s2)
REAL_FATTR_NONNULL_ALL REAL_FATTR_PURE REAL_FATTR_WARN_UNUSED_RESULT;
/// Compare strings
///
/// @param[in] ic True if case is to be ignored.
///
/// @return 0 if s1 == s2, <0 if s1 < s2, >0 if s1 > s2.
static inline int mb_strcmp_ic(bool ic, const char *s1, const char *s2)
{
return (ic ? mb_stricmp(s1, s2) : strcmp(s1, s2));
}
// Use our own character-case definitions, because the current locale may
// differ from what the .spl file uses.
// These must not be called with negative number!