aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/compiler.h
diff options
context:
space:
mode:
authorIlnur Khuziev <ilnur.khuziev@yandex.ru>2022-02-10 16:46:13 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:13 +0300
commit736dcd8ca259457a136f2f9f9168c44643914323 (patch)
treeddd46a036d68bfa83aa11b892f31243ea6b068a1 /util/system/compiler.h
parent9bf2fa2b060c9881d3135c2208c624a1dd546ecc (diff)
downloadydb-736dcd8ca259457a136f2f9f9168c44643914323.tar.gz
Restoring authorship annotation for Ilnur Khuziev <ilnur.khuziev@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/compiler.h')
-rw-r--r--util/system/compiler.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/util/system/compiler.h b/util/system/compiler.h
index b373edcc46..d534f92779 100644
--- a/util/system/compiler.h
+++ b/util/system/compiler.h
@@ -187,15 +187,15 @@
#define Y_PUBLIC
#endif
-#if !defined(Y_UNUSED) && !defined(__cplusplus)
+#if !defined(Y_UNUSED) && !defined(__cplusplus)
#define Y_UNUSED(var) (void)(var)
#endif
-#if !defined(Y_UNUSED) && defined(__cplusplus)
+#if !defined(Y_UNUSED) && defined(__cplusplus)
template <class... Types>
constexpr Y_FORCE_INLINE int Y_UNUSED(Types&&...) {
return 0;
};
-#endif
+#endif
/**
* @def Y_ASSUME
@@ -553,15 +553,15 @@ _YandexAbort();
// Memory sanitizer sometimes doesn't correctly set parameter shadow of constant functions.
#if (defined(__clang__) || defined(__GNUC__)) && !defined(_msan_enabled_)
/**
- * @def Y_CONST_FUNCTION
- methods and functions, marked with this method are promised to:
- 1. do not have side effects
- 2. this method do not read global memory
- NOTE: this attribute can't be set for methods that depend on data, pointed by this
- this allow compilers to do hard optimization of that functions
- NOTE: in common case this attribute can't be set if method have pointer-arguments
- NOTE: as result there no any reason to discard result of such method
-*/
+ * @def Y_CONST_FUNCTION
+ methods and functions, marked with this method are promised to:
+ 1. do not have side effects
+ 2. this method do not read global memory
+ NOTE: this attribute can't be set for methods that depend on data, pointed by this
+ this allow compilers to do hard optimization of that functions
+ NOTE: in common case this attribute can't be set if method have pointer-arguments
+ NOTE: as result there no any reason to discard result of such method
+*/
#define Y_CONST_FUNCTION [[gnu::const]]
#endif
@@ -571,13 +571,13 @@ _YandexAbort();
#if defined(__clang__) || defined(__GNUC__)
/**
- * @def Y_PURE_FUNCTION
- methods and functions, marked with this method are promised to:
- 1. do not have side effects
- 2. result will be the same if no global memory changed
- this allow compilers to do hard optimization of that functions
- NOTE: as result there no any reason to discard result of such method
-*/
+ * @def Y_PURE_FUNCTION
+ methods and functions, marked with this method are promised to:
+ 1. do not have side effects
+ 2. result will be the same if no global memory changed
+ this allow compilers to do hard optimization of that functions
+ NOTE: as result there no any reason to discard result of such method
+*/
#define Y_PURE_FUNCTION [[gnu::pure]]
#endif