aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/func_attr.h
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-29 21:52:58 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-29 21:52:58 +0000
commit931bffbda3668ddc609fc1da8f9eb576b170aa52 (patch)
treed8c1843a95da5ea0bb4acc09f7e37843d9995c86 /src/nvim/func_attr.h
parent142d9041391780ac15b89886a54015fdc5c73995 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-userreg.tar.gz
rneovim-userreg.tar.bz2
rneovim-userreg.zip
Merge remote-tracking branch 'upstream/master' into userreguserreg
Diffstat (limited to 'src/nvim/func_attr.h')
-rw-r--r--src/nvim/func_attr.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/nvim/func_attr.h b/src/nvim/func_attr.h
index 6c049df6ff..15370dcb3e 100644
--- a/src/nvim/func_attr.h
+++ b/src/nvim/func_attr.h
@@ -41,7 +41,7 @@
// $ gcc -E -dM - </dev/null
// $ echo | clang -dM -E -
-#include "nvim/macros.h"
+#include "nvim/macros_defs.h"
#ifdef FUNC_ATTR_MALLOC
# undef FUNC_ATTR_MALLOC
@@ -99,6 +99,10 @@
# undef FUNC_ATTR_NO_SANITIZE_UNDEFINED
#endif
+#ifdef FUNC_ATTR_NO_SANITIZE_ADDRESS
+# undef FUNC_ATTR_NO_SANITIZE_ADDRESS
+#endif
+
#ifdef FUNC_ATTR_PRINTF
# undef FUNC_ATTR_PRINTF
#endif
@@ -121,7 +125,7 @@
# define REAL_FATTR_NONNULL_ALL __attribute__((nonnull))
# define REAL_FATTR_NONNULL_ARG(...) __attribute__((nonnull(__VA_ARGS__)))
# define REAL_FATTR_NORETURN __attribute__((noreturn))
-# define REAL_FATTR_PRINTF(x, y) __attribute__((format (printf, x, y)))
+# define REAL_FATTR_PRINTF(x, y) __attribute__((format(printf, x, y)))
# if NVIM_HAS_ATTRIBUTE(returns_nonnull)
# define REAL_FATTR_NONNULL_RET __attribute__((returns_nonnull))
@@ -139,6 +143,11 @@
# define REAL_FATTR_NO_SANITIZE_UNDEFINED \
__attribute__((no_sanitize("undefined")))
# endif
+
+# if NVIM_HAS_ATTRIBUTE(no_sanitize_address)
+# define REAL_FATTR_NO_SANITIZE_ADDRESS \
+ __attribute__((no_sanitize_address))
+# endif
# endif
// Define attributes that are not defined for this compiler.
@@ -199,6 +208,10 @@
# define REAL_FATTR_NO_SANITIZE_UNDEFINED
# endif
+# ifndef REAL_FATTR_NO_SANITIZE_ADDRESS
+# define REAL_FATTR_NO_SANITIZE_ADDRESS
+# endif
+
# ifndef REAL_FATTR_PRINTF
# define REAL_FATTR_PRINTF(x, y)
# endif
@@ -209,12 +222,14 @@
# define FUNC_API_FAST
/// Internal C function not exposed in the RPC API.
# define FUNC_API_NOEXPORT
-/// API function not exposed in VimL/eval.
+/// API function not exposed in Vimscript/eval.
# define FUNC_API_REMOTE_ONLY
-/// API function not exposed in VimL/remote.
+/// API function not exposed in Vimscript/remote.
# define FUNC_API_LUA_ONLY
-/// API function checked textlock.
-# define FUNC_API_CHECK_TEXTLOCK
+/// API function fails during textlock.
+# define FUNC_API_TEXTLOCK
+/// API function fails during textlock, but allows cmdwin.
+# define FUNC_API_TEXTLOCK_ALLOW_CMDWIN
/// API function introduced at the given API level.
# define FUNC_API_SINCE(X)
/// API function deprecated since the given API level.
@@ -233,6 +248,7 @@
# define FUNC_ATTR_NONNULL_RET REAL_FATTR_NONNULL_RET
# define FUNC_ATTR_NORETURN REAL_FATTR_NORETURN
# define FUNC_ATTR_NO_SANITIZE_UNDEFINED REAL_FATTR_NO_SANITIZE_UNDEFINED
+# define FUNC_ATTR_NO_SANITIZE_ADDRESS REAL_FATTR_NO_SANITIZE_ADDRESS
# define FUNC_ATTR_PRINTF(x, y) REAL_FATTR_PRINTF(x, y)
#elif !defined(DO_NOT_DEFINE_EMPTY_ATTRIBUTES)
# define FUNC_ATTR_MALLOC
@@ -249,5 +265,6 @@
# define FUNC_ATTR_NONNULL_RET
# define FUNC_ATTR_NORETURN
# define FUNC_ATTR_NO_SANITIZE_UNDEFINED
+# define FUNC_ATTR_NO_SANITIZE_ADDRESS
# define FUNC_ATTR_PRINTF(x, y)
#endif