diff options
author | Nicolas Hillegeer <nicolas@hillegeer.com> | 2014-07-23 14:37:48 +0200 |
---|---|---|
committer | Nicolas Hillegeer <nicolas@hillegeer.com> | 2014-07-23 14:37:48 +0200 |
commit | f430ec5c50fbe7707343136cc4f3dde72b62d950 (patch) | |
tree | 4cd14c28356fb39ef86081ddf6f90ce2471a9339 | |
parent | ba04a1c30674523fb7880b3003d8087ed7852cd9 (diff) | |
download | rneovim-f430ec5c50fbe7707343136cc4f3dde72b62d950.tar.gz rneovim-f430ec5c50fbe7707343136cc4f3dde72b62d950.tar.bz2 rneovim-f430ec5c50fbe7707343136cc4f3dde72b62d950.zip |
func_attr: clang/icc support NONNULL_* attr
Both clang and (apparently) icc support the nonnull attribute. So I'm not
sure why it wasn't enabled in the first place.
- clang: http://clang-analyzer.llvm.org/annotations.html#attr_nonnull
- icc: https://software.intel.com/en-us/forums/topic/280290 (not conclusive
evidence, but the best I could find, lacking docs)
-rw-r--r-- | src/nvim/func_attr.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/func_attr.h b/src/nvim/func_attr.h index 6c29f0fed4..c75d0ab312 100644 --- a/src/nvim/func_attr.h +++ b/src/nvim/func_attr.h @@ -105,6 +105,8 @@ #define REAL_FATTR_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #define REAL_FATTR_ALWAYS_INLINE __attribute__((always_inline)) #define REAL_FATTR_UNUSED __attribute__((unused)) + #define REAL_FATTR_NONNULL_ALL __attribute__((nonnull)) + #define REAL_FATTR_NONNULL_ARG(...) __attribute__((nonnull(__VA_ARGS__))) #ifdef __clang__ // clang only @@ -118,8 +120,6 @@ // gcc only #define REAL_FATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x))) #define REAL_FATTR_ALLOC_SIZE_PROD(x,y) __attribute__((alloc_size(x,y))) - #define REAL_FATTR_NONNULL_ALL __attribute__((nonnull)) - #define REAL_FATTR_NONNULL_ARG(...) __attribute__((nonnull(__VA_ARGS__))) #if GCC_VERSION >= 40900 #define REAL_FATTR_NONNULL_RET __attribute__((returns_nonnull)) #endif |