mirror of
https://github.com/neovim/neovim.git
synced 2026-04-21 23:05:41 +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/printf_format',
|
||||
'build/storage_class',
|
||||
'build/useless_fattr',
|
||||
'readability/alt_tokens',
|
||||
'readability/bool',
|
||||
'readability/braces',
|
||||
@@ -1224,6 +1225,10 @@ def CheckForHeaderGuard(filename, lines, error):
|
||||
lines: An array of strings, each representing a line of the file.
|
||||
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)
|
||||
|
||||
|
||||
@@ -233,10 +233,6 @@
|
||||
///
|
||||
/// 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.
|
||||
#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 <inttypes.h>
|
||||
#include <assert.h>
|
||||
@@ -816,4 +812,3 @@ encode_vim_to__error_ret:
|
||||
// Prevent “unused label” warnings.
|
||||
goto typval_encode_stop_converting_one_item;
|
||||
}
|
||||
#endif // NVIM_EVAL_TYPVAL_ENCODE_C_H
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
// $ gcc -E -dM - </dev/null
|
||||
// $ echo | clang -dM -E -
|
||||
|
||||
#ifndef NVIM_FUNC_ATTR_H
|
||||
#define NVIM_FUNC_ATTR_H
|
||||
#undef NVIM_FUNC_ATTR_H
|
||||
|
||||
#ifdef FUNC_ATTR_MALLOC
|
||||
# undef FUNC_ATTR_MALLOC
|
||||
#endif
|
||||
@@ -213,4 +209,3 @@
|
||||
# define FUNC_ATTR_NONNULL_ARG(...)
|
||||
# define FUNC_ATTR_NONNULL_RET
|
||||
#endif
|
||||
#endif // NVIM_FUNC_ATTR_H
|
||||
|
||||
Reference in New Issue
Block a user