mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 23:31:51 +00:00
clint: Allow omitting include guards in .c.h file and func_attr.h file
This commit is contained in:
@@ -182,6 +182,7 @@ _ERROR_CATEGORIES = [
|
|||||||
'build/include_order',
|
'build/include_order',
|
||||||
'build/printf_format',
|
'build/printf_format',
|
||||||
'build/storage_class',
|
'build/storage_class',
|
||||||
|
'build/useless_fattr',
|
||||||
'readability/alt_tokens',
|
'readability/alt_tokens',
|
||||||
'readability/bool',
|
'readability/bool',
|
||||||
'readability/braces',
|
'readability/braces',
|
||||||
@@ -1224,6 +1225,10 @@ def CheckForHeaderGuard(filename, lines, error):
|
|||||||
lines: An array of strings, each representing a line of the file.
|
lines: An array of strings, each representing a line of the file.
|
||||||
error: The function to call with any errors found.
|
error: The function to call with any errors found.
|
||||||
"""
|
"""
|
||||||
|
if filename.endswith('.c.h') or FileInfo(filename).RelativePath() in set((
|
||||||
|
'func_attr.h',
|
||||||
|
)):
|
||||||
|
return
|
||||||
|
|
||||||
cppvar = GetHeaderGuardCPPVariable(filename)
|
cppvar = GetHeaderGuardCPPVariable(filename)
|
||||||
|
|
||||||
|
@@ -233,10 +233,6 @@
|
|||||||
///
|
///
|
||||||
/// This name will only be used by one of the above macros which are defined by
|
/// This name will only be used by one of the above macros which are defined by
|
||||||
/// the caller. Functions defined here do not use first argument directly.
|
/// the caller. Functions defined here do not use first argument directly.
|
||||||
#ifndef NVIM_EVAL_TYPVAL_ENCODE_C_H
|
|
||||||
#define NVIM_EVAL_TYPVAL_ENCODE_C_H
|
|
||||||
#undef NVIM_EVAL_TYPVAL_ENCODE_C_H
|
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@@ -816,4 +812,3 @@ encode_vim_to__error_ret:
|
|||||||
// Prevent “unused label” warnings.
|
// Prevent “unused label” warnings.
|
||||||
goto typval_encode_stop_converting_one_item;
|
goto typval_encode_stop_converting_one_item;
|
||||||
}
|
}
|
||||||
#endif // NVIM_EVAL_TYPVAL_ENCODE_C_H
|
|
||||||
|
@@ -41,10 +41,6 @@
|
|||||||
// $ gcc -E -dM - </dev/null
|
// $ gcc -E -dM - </dev/null
|
||||||
// $ echo | clang -dM -E -
|
// $ echo | clang -dM -E -
|
||||||
|
|
||||||
#ifndef NVIM_FUNC_ATTR_H
|
|
||||||
#define NVIM_FUNC_ATTR_H
|
|
||||||
#undef NVIM_FUNC_ATTR_H
|
|
||||||
|
|
||||||
#ifdef FUNC_ATTR_MALLOC
|
#ifdef FUNC_ATTR_MALLOC
|
||||||
# undef FUNC_ATTR_MALLOC
|
# undef FUNC_ATTR_MALLOC
|
||||||
#endif
|
#endif
|
||||||
@@ -213,4 +209,3 @@
|
|||||||
# define FUNC_ATTR_NONNULL_ARG(...)
|
# define FUNC_ATTR_NONNULL_ARG(...)
|
||||||
# define FUNC_ATTR_NONNULL_RET
|
# define FUNC_ATTR_NONNULL_RET
|
||||||
#endif
|
#endif
|
||||||
#endif // NVIM_FUNC_ATTR_H
|
|
||||||
|
Reference in New Issue
Block a user