diff options
author | dundargoc <gocdundar@gmail.com> | 2023-11-10 14:06:04 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-11-20 20:05:43 +0100 |
commit | 488038580934f301c1528a14548ec0cabd16c2cd (patch) | |
tree | ef0d5c2e3de1cd4dce86e319c68b90c2096d2408 /src/nvim/eval/typval_encode.h | |
parent | a6e3d93421ba13c407a96fac9cc01fa41ec7ad98 (diff) | |
download | rneovim-488038580934f301c1528a14548ec0cabd16c2cd.tar.gz rneovim-488038580934f301c1528a14548ec0cabd16c2cd.tar.bz2 rneovim-488038580934f301c1528a14548ec0cabd16c2cd.zip |
build: adjust clang-tidy warning exclusion logic
Enable all clang-tidy warnings by default instead of disabling them.
This ensures that we don't miss useful warnings on each clang-tidy
version upgrade. A drawback of this is that it will force us to either
fix or adjust the warnings as soon as possible.
Diffstat (limited to 'src/nvim/eval/typval_encode.h')
-rw-r--r-- | src/nvim/eval/typval_encode.h | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/src/nvim/eval/typval_encode.h b/src/nvim/eval/typval_encode.h index 743acd8800..a6e0bd4b2b 100644 --- a/src/nvim/eval/typval_encode.h +++ b/src/nvim/eval/typval_encode.h @@ -62,14 +62,6 @@ typedef struct { /// Stack used to convert Vimscript values to messagepack. typedef kvec_withinit_t(MPConvStackVal, 8) MPConvStack; -// Defines for MPConvStack -#define _mp_size kv_size -#define _mp_init kvi_init -#define _mp_destroy kvi_destroy -#define _mp_push kvi_push -#define _mp_pop kv_pop -#define _mp_last kv_last - static inline size_t tv_strlen(const typval_T *tv) REAL_FATTR_ALWAYS_INLINE REAL_FATTR_PURE REAL_FATTR_WARN_UNUSED_RESULT REAL_FATTR_NONNULL_ALL; @@ -95,21 +87,21 @@ static inline size_t tv_strlen(const typval_T *const tv) /// copyID (variable) it is set to copyID. /// @param[in] copyID CopyID used by the caller. /// @param conv_type Type of the conversion, @see MPConvStackValType. -#define _TYPVAL_ENCODE_DO_CHECK_SELF_REFERENCE(val, copyID_attr, copyID, \ - conv_type) \ +#define TYPVAL_ENCODE_DO_CHECK_SELF_REFERENCE(val, copyID_attr, copyID, \ + conv_type) \ do { \ - const int te_csr_ret = _TYPVAL_ENCODE_CHECK_SELF_REFERENCE(TYPVAL_ENCODE_FIRST_ARG_NAME, \ - (val), &(val)->copyID_attr, mpstack, \ - copyID, conv_type, objname); \ + const int te_csr_ret = TYPVAL_ENCODE_CHECK_SELF_REFERENCE(TYPVAL_ENCODE_FIRST_ARG_NAME, \ + (val), &(val)->copyID_attr, mpstack, \ + copyID, conv_type, objname); \ if (te_csr_ret != NOTDONE) { \ return te_csr_ret; \ } \ } while (0) -#define _TYPVAL_ENCODE_FUNC_NAME_INNER_2(pref, name, suf) \ +#define TYPVAL_ENCODE_FUNC_NAME_INNER_2(pref, name, suf) \ pref##name##suf -#define _TYPVAL_ENCODE_FUNC_NAME_INNER(pref, name, suf) \ - _TYPVAL_ENCODE_FUNC_NAME_INNER_2(pref, name, suf) +#define TYPVAL_ENCODE_FUNC_NAME_INNER(pref, name, suf) \ + TYPVAL_ENCODE_FUNC_NAME_INNER_2(pref, name, suf) /// Construct function name, possibly using macros /// @@ -121,21 +113,21 @@ static inline size_t tv_strlen(const typval_T *const tv) /// @param[in] suf Suffix. /// /// @return Concat: pref + #TYPVAL_ENCODE_NAME + suf. -#define _TYPVAL_ENCODE_FUNC_NAME(pref, suf) \ - _TYPVAL_ENCODE_FUNC_NAME_INNER(pref, TYPVAL_ENCODE_NAME, suf) +#define TYPVAL_ENCODE_FUNC_NAME(pref, suf) \ + TYPVAL_ENCODE_FUNC_NAME_INNER(pref, TYPVAL_ENCODE_NAME, suf) /// Self reference checker function name -#define _TYPVAL_ENCODE_CHECK_SELF_REFERENCE \ - _TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _check_self_reference) +#define TYPVAL_ENCODE_CHECK_SELF_REFERENCE \ + TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _check_self_reference) /// Entry point function name -#define _TYPVAL_ENCODE_ENCODE \ - _TYPVAL_ENCODE_FUNC_NAME(encode_vim_to_, ) +#define TYPVAL_ENCODE_ENCODE \ + TYPVAL_ENCODE_FUNC_NAME(encode_vim_to_, ) /// Name of the …convert_one_value function -#define _TYPVAL_ENCODE_CONVERT_ONE_VALUE \ - _TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _convert_one_value) +#define TYPVAL_ENCODE_CONVERT_ONE_VALUE \ + TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _convert_one_value) /// Name of the dummy const dict_T *const variable #define TYPVAL_ENCODE_NODICT_VAR \ - _TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _nodict_var) + TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _nodict_var) |