aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/basetypes/MCUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/basetypes/MCUtils.h')
-rw-r--r--src/core/basetypes/MCUtils.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/basetypes/MCUtils.h b/src/core/basetypes/MCUtils.h
index 3892350f..eb4ef290 100644
--- a/src/core/basetypes/MCUtils.h
+++ b/src/core/basetypes/MCUtils.h
@@ -48,4 +48,21 @@
# define MAILCORE_EXPORT
#endif
+#ifdef __clang__
+
+#if __has_feature(attribute_analyzer_noreturn)
+#define CLANG_ANALYZER_NORETURN __attribute__((analyzer_noreturn))
+#else
+#define CLANG_ANALYZER_NORETURN
+#endif
+
+#define ATTRIBUTE_RETURNS_NONNULL __attribute__((returns_nonnull))
+
+#else
+
+#define CLANG_ANALYZER_NORETURN
+#define ATTRIBUTE_RETURNS_NONNULL
+
+#endif
+
#endif