diff options
author | somov <somov@yandex-team.ru> | 2022-02-10 16:45:47 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:47 +0300 |
commit | a5950576e397b1909261050b8c7da16db58f10b1 (patch) | |
tree | 7ba7677f6a4c3e19e2cefab34d16df2c8963b4d4 /contrib/restricted/abseil-cpp-tstring/y_absl/base | |
parent | 81eddc8c0b55990194e112b02d127b87d54164a9 (diff) | |
download | ydb-a5950576e397b1909261050b8c7da16db58f10b1.tar.gz |
Restoring authorship annotation for <somov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/restricted/abseil-cpp-tstring/y_absl/base')
57 files changed, 378 insertions, 378 deletions
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/call_once.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/call_once.h index 5d80e4e7ca..68ab3210ec 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/call_once.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/call_once.h @@ -31,22 +31,22 @@ #include <type_traits> #include <utility> -#include "y_absl/base/internal/invoke.h" -#include "y_absl/base/internal/low_level_scheduling.h" -#include "y_absl/base/internal/raw_logging.h" -#include "y_absl/base/internal/scheduling_mode.h" -#include "y_absl/base/internal/spinlock_wait.h" -#include "y_absl/base/macros.h" -#include "y_absl/base/optimization.h" -#include "y_absl/base/port.h" - -namespace y_absl { +#include "y_absl/base/internal/invoke.h" +#include "y_absl/base/internal/low_level_scheduling.h" +#include "y_absl/base/internal/raw_logging.h" +#include "y_absl/base/internal/scheduling_mode.h" +#include "y_absl/base/internal/spinlock_wait.h" +#include "y_absl/base/macros.h" +#include "y_absl/base/optimization.h" +#include "y_absl/base/port.h" + +namespace y_absl { ABSL_NAMESPACE_BEGIN class once_flag; namespace base_internal { -std::atomic<uint32_t>* ControlWord(y_absl::once_flag* flag); +std::atomic<uint32_t>* ControlWord(y_absl::once_flag* flag); } // namespace base_internal // call_once() @@ -66,15 +66,15 @@ std::atomic<uint32_t>* ControlWord(y_absl::once_flag* flag); // class MyInitClass { // public: // ... -// mutable y_absl::once_flag once_; +// mutable y_absl::once_flag once_; // // MyInitClass* init() const { -// y_absl::call_once(once_, &MyInitClass::Init, this); +// y_absl::call_once(once_, &MyInitClass::Init, this); // return ptr_; // } // template <typename Callable, typename... Args> -void call_once(y_absl::once_flag& flag, Callable&& fn, Args&&... args); +void call_once(y_absl::once_flag& flag, Callable&& fn, Args&&... args); // once_flag // @@ -103,7 +103,7 @@ namespace base_internal { // Like call_once, but uses KERNEL_ONLY scheduling. Intended to be used to // initialize entities used by the scheduler implementation. template <typename Callable, typename... Args> -void LowLevelCallOnce(y_absl::once_flag* flag, Callable&& fn, Args&&... args); +void LowLevelCallOnce(y_absl::once_flag* flag, Callable&& fn, Args&&... args); // Disables scheduling while on stack when scheduling mode is non-cooperative. // No effect for cooperative scheduling modes. @@ -190,7 +190,7 @@ inline std::atomic<uint32_t>* ControlWord(once_flag* flag) { } template <typename Callable, typename... Args> -void LowLevelCallOnce(y_absl::once_flag* flag, Callable&& fn, Args&&... args) { +void LowLevelCallOnce(y_absl::once_flag* flag, Callable&& fn, Args&&... args) { std::atomic<uint32_t>* once = base_internal::ControlWord(flag); uint32_t s = once->load(std::memory_order_acquire); if (ABSL_PREDICT_FALSE(s != base_internal::kOnceDone)) { @@ -203,7 +203,7 @@ void LowLevelCallOnce(y_absl::once_flag* flag, Callable&& fn, Args&&... args) { } // namespace base_internal template <typename Callable, typename... Args> -void call_once(y_absl::once_flag& flag, Callable&& fn, Args&&... args) { +void call_once(y_absl::once_flag& flag, Callable&& fn, Args&&... args) { std::atomic<uint32_t>* once = base_internal::ControlWord(&flag); uint32_t s = once->load(std::memory_order_acquire); if (ABSL_PREDICT_FALSE(s != base_internal::kOnceDone)) { @@ -214,6 +214,6 @@ void call_once(y_absl::once_flag& flag, Callable&& fn, Args&&... args) { } ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_CALL_ONCE_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/casts.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/casts.h index 6270ede21e..515b1b66f8 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/casts.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/casts.h @@ -29,11 +29,11 @@ #include <type_traits> #include <utility> -#include "y_absl/base/internal/identity.h" -#include "y_absl/base/macros.h" -#include "y_absl/meta/type_traits.h" +#include "y_absl/base/internal/identity.h" +#include "y_absl/base/macros.h" +#include "y_absl/meta/type_traits.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace internal_casts { @@ -99,7 +99,7 @@ struct is_bitcastable // // Such implicit cast chaining may be useful within template logic. template <typename To> -constexpr To implicit_cast(typename y_absl::internal::identity_t<To> to) { +constexpr To implicit_cast(typename y_absl::internal::identity_t<To> to) { return to; } @@ -182,6 +182,6 @@ inline Dest bit_cast(const Source& source) { } ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_CASTS_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h index 162843aa00..e8e3fd1b32 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h @@ -33,7 +33,7 @@ // selectively include the `mmap.h` header and bracket code using that feature // in the macro: // -// #include "y_absl/base/config.h" +// #include "y_absl/base/config.h" // // #ifdef ABSL_HAVE_MMAP // #include "sys/mman.h" @@ -63,8 +63,8 @@ #include <TargetConditionals.h> #endif -#include "y_absl/base/options.h" -#include "y_absl/base/policy_checks.h" +#include "y_absl/base/options.h" +#include "y_absl/base/policy_checks.h" // Abseil long-term support (LTS) releases will define // `ABSL_LTS_RELEASE_VERSION` to the integer representing the date string of the @@ -261,7 +261,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || // ABSL_HAVE_SOURCE_LOCATION_CURRENT // -// Indicates whether `y_absl::SourceLocation::current()` will return useful +// Indicates whether `y_absl::SourceLocation::current()` will return useful // information in some contexts. #ifndef ABSL_HAVE_SOURCE_LOCATION_CURRENT #if ABSL_INTERNAL_HAS_KEYWORD(__builtin_LINE) && \ @@ -517,7 +517,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || #elif defined(_WIN32) #define ABSL_IS_LITTLE_ENDIAN 1 #else -#error "y_absl endian detection needs to be set up for your compiler" +#error "y_absl endian detection needs to be set up for your compiler" #endif // macOS 10.13 and iOS 10.11 don't let you use <any>, <optional>, or <variant> @@ -610,7 +610,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || // ABSL_USES_STD_ANY // -// Indicates whether y_absl::any is an alias for std::any. +// Indicates whether y_absl::any is an alias for std::any. #if !defined(ABSL_OPTION_USE_STD_ANY) #error options.h is misconfigured. #elif ABSL_OPTION_USE_STD_ANY == 0 || \ @@ -625,7 +625,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || // ABSL_USES_STD_OPTIONAL // -// Indicates whether y_absl::optional is an alias for std::optional. +// Indicates whether y_absl::optional is an alias for std::optional. #if !defined(ABSL_OPTION_USE_STD_OPTIONAL) #error options.h is misconfigured. #elif ABSL_OPTION_USE_STD_OPTIONAL == 0 || \ @@ -640,7 +640,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || // ABSL_USES_STD_VARIANT // -// Indicates whether y_absl::variant is an alias for std::variant. +// Indicates whether y_absl::variant is an alias for std::variant. #if !defined(ABSL_OPTION_USE_STD_VARIANT) #error options.h is misconfigured. #elif ABSL_OPTION_USE_STD_VARIANT == 0 || \ @@ -655,7 +655,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || // ABSL_USES_STD_STRING_VIEW // -// Indicates whether y_absl::string_view is an alias for std::string_view. +// Indicates whether y_absl::string_view is an alias for std::string_view. #if !defined(ABSL_OPTION_USE_STD_STRING_VIEW) #error options.h is misconfigured. #elif ABSL_OPTION_USE_STD_STRING_VIEW == 0 || \ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/const_init.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/const_init.h index 4bab055dda..6dd29294fd 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/const_init.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/const_init.h @@ -51,19 +51,19 @@ // // For a few core Abseil classes, we make a best effort to allow for safe global // instances, even though these classes have non-trivial destructors. These -// objects can be created with the y_absl::kConstInit tag. For example: -// ABSL_CONST_INIT y_absl::Mutex global_mutex(y_absl::kConstInit); +// objects can be created with the y_absl::kConstInit tag. For example: +// ABSL_CONST_INIT y_absl::Mutex global_mutex(y_absl::kConstInit); // -// The line above declares a global variable of type y_absl::Mutex which can be +// The line above declares a global variable of type y_absl::Mutex which can be // accessed at any point during startup or shutdown. global_mutex's destructor // will still run, but will not invalidate the object. Note that C++ specifies // that accessing an object after its destructor has run results in undefined // behavior, but this pattern works on the toolchains we support. // -// The y_absl::kConstInit tag should only be used to define objects with static +// The y_absl::kConstInit tag should only be used to define objects with static // or thread_local storage duration. -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN enum ConstInitType { @@ -71,6 +71,6 @@ enum ConstInitType { }; ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_CONST_INIT_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/atomic_hook.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/atomic_hook.h index 5bdf360a57..9923de44f7 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/atomic_hook.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/atomic_hook.h @@ -35,7 +35,7 @@ #define ABSL_HAVE_WORKING_ATOMIC_POINTER 1 #endif -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -195,6 +195,6 @@ class AtomicHook<ReturnType (*)(Args...)> { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_INTERNAL_ATOMIC_HOOK_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/atomic_hook_test_helper.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/atomic_hook_test_helper.h index e600d27f4f..0d64d626e7 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/atomic_hook_test_helper.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/atomic_hook_test_helper.h @@ -15,20 +15,20 @@ #ifndef ABSL_BASE_ATOMIC_HOOK_TEST_HELPER_H_ #define ABSL_BASE_ATOMIC_HOOK_TEST_HELPER_H_ -#include "y_absl/base/internal/atomic_hook.h" +#include "y_absl/base/internal/atomic_hook.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace atomic_hook_internal { using VoidF = void (*)(); -extern y_absl::base_internal::AtomicHook<VoidF> func; +extern y_absl::base_internal::AtomicHook<VoidF> func; extern int default_func_calls; void DefaultFunc(); void RegisterFunc(VoidF func); } // namespace atomic_hook_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_ATOMIC_HOOK_TEST_HELPER_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/cycleclock.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/cycleclock.cc index 6b43f7c184..dfb79fb656 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/cycleclock.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/cycleclock.cc @@ -20,14 +20,14 @@ // with modifications by m3b. See also // https://setisvn.ssl.berkeley.edu/svn/lib/fftw-3.0.1/kernel/cycle.h -#include "y_absl/base/internal/cycleclock.h" +#include "y_absl/base/internal/cycleclock.h" #include <atomic> #include <chrono> // NOLINT(build/c++11) -#include "y_absl/base/internal/unscaledcycleclock.h" +#include "y_absl/base/internal/unscaledcycleclock.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -104,4 +104,4 @@ double CycleClock::Frequency() { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/cycleclock.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/cycleclock.h index 389c9093e3..1ebe79b0d1 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/cycleclock.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/cycleclock.h @@ -46,7 +46,7 @@ #include "y_absl/base/config.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -89,6 +89,6 @@ class CycleClockSource { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_INTERNAL_CYCLECLOCK_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/direct_mmap.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/direct_mmap.h index 82be9f94ab..f129dfa49b 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/direct_mmap.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/direct_mmap.h @@ -18,7 +18,7 @@ #ifndef ABSL_BASE_INTERNAL_DIRECT_MMAP_H_ #define ABSL_BASE_INTERNAL_DIRECT_MMAP_H_ -#include "y_absl/base/config.h" +#include "y_absl/base/config.h" #if ABSL_HAVE_MMAP @@ -65,7 +65,7 @@ extern "C" void* __mmap2(void*, size_t, int, int, int, size_t); #define SYS_mmap2 __NR_mmap2 #endif -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -138,14 +138,14 @@ inline int DirectMunmap(void* start, size_t length) { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #else // !__linux__ // For non-linux platforms where we have mmap, just dispatch directly to the // actual mmap()/munmap() methods. -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -160,7 +160,7 @@ inline int DirectMunmap(void* start, size_t length) { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // __linux__ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/endian.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/endian.h index 0f7adb8bf6..70a2c25f29 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/endian.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/endian.h @@ -27,11 +27,11 @@ #include <cstdint> #include "y_absl/base/casts.h" -#include "y_absl/base/config.h" -#include "y_absl/base/internal/unaligned_access.h" -#include "y_absl/base/port.h" +#include "y_absl/base/config.h" +#include "y_absl/base/internal/unaligned_access.h" +#include "y_absl/base/port.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN // Use compiler byte-swapping intrinsics if they are available. 32-bit @@ -322,6 +322,6 @@ inline void Store64(void *p, uint64_t v) { } // namespace big_endian ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_INTERNAL_ENDIAN_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/exception_safety_testing.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/exception_safety_testing.h index 3009f17875..5f28af8acb 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/exception_safety_testing.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/exception_safety_testing.h @@ -17,7 +17,7 @@ #ifndef ABSL_BASE_INTERNAL_EXCEPTION_SAFETY_TESTING_H_ #define ABSL_BASE_INTERNAL_EXCEPTION_SAFETY_TESTING_H_ -#include "y_absl/base/config.h" +#include "y_absl/base/config.h" #ifdef ABSL_HAVE_EXCEPTIONS @@ -31,12 +31,12 @@ #include <unordered_map> #include "gtest/gtest.h" -#include "y_absl/base/internal/pretty_function.h" -#include "y_absl/memory/memory.h" -#include "y_absl/meta/type_traits.h" -#include "y_absl/strings/string_view.h" -#include "y_absl/strings/substitute.h" -#include "y_absl/utility/utility.h" +#include "y_absl/base/internal/pretty_function.h" +#include "y_absl/memory/memory.h" +#include "y_absl/meta/type_traits.h" +#include "y_absl/strings/string_view.h" +#include "y_absl/strings/substitute.h" +#include "y_absl/utility/utility.h" namespace testing { @@ -44,29 +44,29 @@ enum class TypeSpec; enum class AllocSpec; constexpr TypeSpec operator|(TypeSpec a, TypeSpec b) { - using T = y_absl::underlying_type_t<TypeSpec>; + using T = y_absl::underlying_type_t<TypeSpec>; return static_cast<TypeSpec>(static_cast<T>(a) | static_cast<T>(b)); } constexpr TypeSpec operator&(TypeSpec a, TypeSpec b) { - using T = y_absl::underlying_type_t<TypeSpec>; + using T = y_absl::underlying_type_t<TypeSpec>; return static_cast<TypeSpec>(static_cast<T>(a) & static_cast<T>(b)); } constexpr AllocSpec operator|(AllocSpec a, AllocSpec b) { - using T = y_absl::underlying_type_t<AllocSpec>; + using T = y_absl::underlying_type_t<AllocSpec>; return static_cast<AllocSpec>(static_cast<T>(a) | static_cast<T>(b)); } constexpr AllocSpec operator&(AllocSpec a, AllocSpec b) { - using T = y_absl::underlying_type_t<AllocSpec>; + using T = y_absl::underlying_type_t<AllocSpec>; return static_cast<AllocSpec>(static_cast<T>(a) & static_cast<T>(b)); } namespace exceptions_internal { -TString GetSpecString(TypeSpec); -TString GetSpecString(AllocSpec); +TString GetSpecString(TypeSpec); +TString GetSpecString(AllocSpec); struct NoThrowTag {}; struct StrongGuaranteeTagType {}; @@ -75,12 +75,12 @@ struct StrongGuaranteeTagType {}; // exceptions specifically thrown by ThrowingValue. class TestException { public: - explicit TestException(y_absl::string_view msg) : msg_(msg) {} + explicit TestException(y_absl::string_view msg) : msg_(msg) {} virtual ~TestException() {} virtual const char* what() const noexcept { return msg_.c_str(); } private: - TString msg_; + TString msg_; }; // TestBadAllocException exists because allocation functions must throw an @@ -90,7 +90,7 @@ class TestException { // bad_alloc exception in TestExceptionSafety. class TestBadAllocException : public std::bad_alloc, public TestException { public: - explicit TestBadAllocException(y_absl::string_view msg) : TestException(msg) {} + explicit TestBadAllocException(y_absl::string_view msg) : TestException(msg) {} using TestException::what; }; @@ -102,14 +102,14 @@ inline void SetCountdown(int i = 0) { countdown = i; } // Sets the countdown to the terminal value -1 inline void UnsetCountdown() { SetCountdown(-1); } -void MaybeThrow(y_absl::string_view msg, bool throw_bad_alloc = false); +void MaybeThrow(y_absl::string_view msg, bool throw_bad_alloc = false); testing::AssertionResult FailureMessage(const TestException& e, int countdown) noexcept; struct TrackedAddress { bool is_alive; - TString description; + TString description; }; // Inspects the constructions and destructions of anything inheriting from @@ -136,7 +136,7 @@ class ConstructorTracker { } } - static void ObjectConstructed(void* address, TString description) { + static void ObjectConstructed(void* address, TString description) { if (!CurrentlyTracking()) return; TrackedAddress& tracked_address = @@ -172,11 +172,11 @@ class ConstructorTracker { return current_tracker_instance_ != nullptr; } - static TString ErrorMessage(void* address, - const TString& address_description, + static TString ErrorMessage(void* address, + const TString& address_description, int countdown, - const TString& error_description) { - return y_absl::Substitute( + const TString& error_description) { + return y_absl::Substitute( "With coundtown at $0:\n" " $1\n" " Object originally constructed by $2\n" @@ -196,7 +196,7 @@ class TrackedObject { TrackedObject(TrackedObject&&) = delete; protected: - explicit TrackedObject(TString description) { + explicit TrackedObject(TString description) { ConstructorTracker::ObjectConstructed(this, std::move(description)); } @@ -294,7 +294,7 @@ class ThrowingValue : private exceptions_internal::TrackedObject { ThrowingValue(int i, exceptions_internal::NoThrowTag) noexcept : TrackedObject(GetInstanceString(i)), dummy_(i) {} - // y_absl expects nothrow destructors + // y_absl expects nothrow destructors ~ThrowingValue() noexcept = default; ThrowingValue& operator=(const ThrowingValue& other) noexcept( @@ -592,8 +592,8 @@ class ThrowingValue : private exceptions_internal::TrackedObject { const int& Get() const noexcept { return dummy_; } private: - static TString GetInstanceString(int dummy) { - return y_absl::StrCat("ThrowingValue<", + static TString GetInstanceString(int dummy) { + return y_absl::StrCat("ThrowingValue<", exceptions_internal::GetSpecString(Spec), ">(", dummy, ")"); } @@ -753,8 +753,8 @@ class ThrowingAllocator : private exceptions_internal::TrackedObject { friend class ThrowingAllocator; private: - static TString GetInstanceString(int dummy) { - return y_absl::StrCat("ThrowingAllocator<", + static TString GetInstanceString(int dummy) { + return y_absl::StrCat("ThrowingAllocator<", exceptions_internal::GetSpecString(Spec), ">(", dummy, ")"); } @@ -768,10 +768,10 @@ class ThrowingAllocator : private exceptions_internal::TrackedObject { if (*dummy_ < 0) std::abort(); } - void ReadStateAndMaybeThrow(y_absl::string_view msg) const { + void ReadStateAndMaybeThrow(y_absl::string_view msg) const { if (!IsSpecified(AllocSpec::kNoThrowAllocate)) { exceptions_internal::MaybeThrow( - y_absl::Substitute("Allocator id $0 threw from $1", *dummy_, msg)); + y_absl::Substitute("Allocator id $0 threw from $1", *dummy_, msg)); } } @@ -834,7 +834,7 @@ template <typename T> class DefaultFactory { public: explicit DefaultFactory(const T& t) : t_(t) {} - std::unique_ptr<T> operator()() const { return y_absl::make_unique<T>(t_); } + std::unique_ptr<T> operator()() const { return y_absl::make_unique<T>(t_); } private: T t_; @@ -842,7 +842,7 @@ class DefaultFactory { template <size_t LazyContractsCount, typename LazyFactory, typename LazyOperation> -using EnableIfTestable = typename y_absl::enable_if_t< +using EnableIfTestable = typename y_absl::enable_if_t< LazyContractsCount != 0 && !std::is_same<LazyFactory, UninitializedT>::value && !std::is_same<LazyOperation, UninitializedT>::value>; @@ -994,7 +994,7 @@ class ExceptionSafetyTestBuilder { * method tester.WithInitialValue(...). */ template <typename NewFactory> - ExceptionSafetyTestBuilder<y_absl::decay_t<NewFactory>, Operation, Contracts...> + ExceptionSafetyTestBuilder<y_absl::decay_t<NewFactory>, Operation, Contracts...> WithFactory(const NewFactory& new_factory) const { return {new_factory, operation_, contracts_}; } @@ -1005,7 +1005,7 @@ class ExceptionSafetyTestBuilder { * newly created tester. */ template <typename NewOperation> - ExceptionSafetyTestBuilder<Factory, y_absl::decay_t<NewOperation>, Contracts...> + ExceptionSafetyTestBuilder<Factory, y_absl::decay_t<NewOperation>, Contracts...> WithOperation(const NewOperation& new_operation) const { return {factory_, new_operation, contracts_}; } @@ -1025,11 +1025,11 @@ class ExceptionSafetyTestBuilder { */ template <typename... MoreContracts> ExceptionSafetyTestBuilder<Factory, Operation, Contracts..., - y_absl::decay_t<MoreContracts>...> + y_absl::decay_t<MoreContracts>...> WithContracts(const MoreContracts&... more_contracts) const { return { factory_, operation_, - std::tuple_cat(contracts_, std::tuple<y_absl::decay_t<MoreContracts>...>( + std::tuple_cat(contracts_, std::tuple<y_absl::decay_t<MoreContracts>...>( more_contracts...))}; } @@ -1053,7 +1053,7 @@ class ExceptionSafetyTestBuilder { typename NewOperation, typename = EnableIfTestable<sizeof...(Contracts), Factory, NewOperation>> testing::AssertionResult Test(const NewOperation& new_operation) const { - return TestImpl(new_operation, y_absl::index_sequence_for<Contracts...>()); + return TestImpl(new_operation, y_absl::index_sequence_for<Contracts...>()); } /* @@ -1089,7 +1089,7 @@ class ExceptionSafetyTestBuilder { template <typename SelectedOperation, size_t... Indices> testing::AssertionResult TestImpl(SelectedOperation selected_operation, - y_absl::index_sequence<Indices...>) const { + y_absl::index_sequence<Indices...>) const { return ExceptionSafetyTest<FactoryElementType<Factory>>( factory_, selected_operation, std::get<Indices>(contracts_)...) .Test(); diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/exception_testing.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/exception_testing.h index f2dd04b9d6..8d29682c06 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/exception_testing.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/exception_testing.h @@ -18,7 +18,7 @@ #define ABSL_BASE_INTERNAL_EXCEPTION_TESTING_H_ #include "gtest/gtest.h" -#include "y_absl/base/config.h" +#include "y_absl/base/config.h" // ABSL_BASE_INTERNAL_EXPECT_FAIL tests either for a specified thrown exception // if exceptions are enabled, or for death with a specified text in the error diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/hide_ptr.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/hide_ptr.h index ccdad25cb7..d956570954 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/hide_ptr.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/hide_ptr.h @@ -19,7 +19,7 @@ #include "y_absl/base/config.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -30,7 +30,7 @@ constexpr uintptr_t HideMask() { } // Hide a pointer from the leak checker. For internal use only. -// Differs from y_absl::IgnoreLeak(ptr) in that y_absl::IgnoreLeak(ptr) causes ptr +// Differs from y_absl::IgnoreLeak(ptr) in that y_absl::IgnoreLeak(ptr) causes ptr // and all objects reachable from ptr to be ignored by the leak checker. template <class T> inline uintptr_t HidePtr(T* ptr) { @@ -46,6 +46,6 @@ inline T* UnhidePtr(uintptr_t hidden) { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_INTERNAL_HIDE_PTR_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/identity.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/identity.h index 2360afeed2..ef4cac601d 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/identity.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/identity.h @@ -18,7 +18,7 @@ #include "y_absl/base/config.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace internal { @@ -32,6 +32,6 @@ using identity_t = typename identity<T>::type; } // namespace internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_INTERNAL_IDENTITY_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/inline_variable.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/inline_variable.h index 38799c5722..d608fe41a3 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/inline_variable.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/inline_variable.h @@ -17,7 +17,7 @@ #include <type_traits> -#include "y_absl/base/internal/identity.h" +#include "y_absl/base/internal/identity.h" // File: // This file define a macro that allows the creation of or emulation of C++17 @@ -68,7 +68,7 @@ // types, etc.. #if defined(__clang__) #define ABSL_INTERNAL_EXTERN_DECL(type, name) \ - extern const ::y_absl::internal::identity_t<type> name; + extern const ::y_absl::internal::identity_t<type> name; #else // Otherwise, just define the macro to do nothing. #define ABSL_INTERNAL_EXTERN_DECL(type, name) #endif // defined(__clang__) @@ -76,7 +76,7 @@ // See above comment at top of file for details. #define ABSL_INTERNAL_INLINE_CONSTEXPR(type, name, init) \ ABSL_INTERNAL_EXTERN_DECL(type, name) \ - inline constexpr ::y_absl::internal::identity_t<type> name = init + inline constexpr ::y_absl::internal::identity_t<type> name = init #else @@ -89,14 +89,14 @@ #define ABSL_INTERNAL_INLINE_CONSTEXPR(var_type, name, init) \ template <class /*AbslInternalDummy*/ = void> \ struct AbslInternalInlineVariableHolder##name { \ - static constexpr ::y_absl::internal::identity_t<var_type> kInstance = init; \ + static constexpr ::y_absl::internal::identity_t<var_type> kInstance = init; \ }; \ \ template <class AbslInternalDummy> \ - constexpr ::y_absl::internal::identity_t<var_type> \ + constexpr ::y_absl::internal::identity_t<var_type> \ AbslInternalInlineVariableHolder##name<AbslInternalDummy>::kInstance; \ \ - static constexpr const ::y_absl::internal::identity_t<var_type>& \ + static constexpr const ::y_absl::internal::identity_t<var_type>& \ name = /* NOLINT */ \ AbslInternalInlineVariableHolder##name<>::kInstance; \ static_assert(sizeof(void (*)(decltype(name))) != 0, \ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/inline_variable_testing.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/inline_variable_testing.h index 190e74e643..bc4f469ff0 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/inline_variable_testing.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/inline_variable_testing.h @@ -15,9 +15,9 @@ #ifndef ABSL_BASE_INLINE_VARIABLE_TESTING_H_ #define ABSL_BASE_INLINE_VARIABLE_TESTING_H_ -#include "y_absl/base/internal/inline_variable.h" +#include "y_absl/base/internal/inline_variable.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace inline_variable_testing_internal { @@ -41,6 +41,6 @@ const int& get_int_b(); } // namespace inline_variable_testing_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_INLINE_VARIABLE_TESTING_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/invoke.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/invoke.h index 928666ff44..8b505a9365 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/invoke.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/invoke.h @@ -39,12 +39,12 @@ #include <type_traits> #include <utility> -#include "y_absl/meta/type_traits.h" +#include "y_absl/meta/type_traits.h" // The following code is internal implementation detail. See the comment at the // top of this file for the API documentation. -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -73,7 +73,7 @@ struct MemFunAndRef : StrippedAccept<MemFunAndRef> { template <typename MemFunType, typename C, typename Obj, typename... Args> struct AcceptImpl<MemFunType C::*, Obj, Args...> : std::integral_constant<bool, std::is_base_of<C, Obj>::value && - y_absl::is_function<MemFunType>::value> { + y_absl::is_function<MemFunType>::value> { }; template <typename MemFun, typename Obj, typename... Args> @@ -94,7 +94,7 @@ struct MemFunAndPtr : StrippedAccept<MemFunAndPtr> { template <typename MemFunType, typename C, typename Ptr, typename... Args> struct AcceptImpl<MemFunType C::*, Ptr, Args...> : std::integral_constant<bool, !std::is_base_of<C, Ptr>::value && - y_absl::is_function<MemFunType>::value> { + y_absl::is_function<MemFunType>::value> { }; template <typename MemFun, typename Ptr, typename... Args> @@ -116,7 +116,7 @@ struct DataMemAndRef : StrippedAccept<DataMemAndRef> { template <typename R, typename C, typename Obj> struct AcceptImpl<R C::*, Obj> : std::integral_constant<bool, std::is_base_of<C, Obj>::value && - !y_absl::is_function<R>::value> {}; + !y_absl::is_function<R>::value> {}; template <typename DataMem, typename Ref> static decltype(std::declval<Ref>().*std::declval<DataMem>()) Invoke( @@ -134,7 +134,7 @@ struct DataMemAndPtr : StrippedAccept<DataMemAndPtr> { template <typename R, typename C, typename Ptr> struct AcceptImpl<R C::*, Ptr> : std::integral_constant<bool, !std::is_base_of<C, Ptr>::value && - !y_absl::is_function<R>::value> {}; + !y_absl::is_function<R>::value> {}; template <typename DataMem, typename Ptr> static decltype((*std::declval<Ptr>()).*std::declval<DataMem>()) Invoke( @@ -182,6 +182,6 @@ invoke_result_t<F, Args...> invoke(F&& f, Args&&... args) { } } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_INTERNAL_INVOKE_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_alloc.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_alloc.cc index 0c477d1b28..8d39bec9e1 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_alloc.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_alloc.cc @@ -17,16 +17,16 @@ // This allocator is slow and wasteful of memory; // it should not be used when performance is key. -#include "y_absl/base/internal/low_level_alloc.h" +#include "y_absl/base/internal/low_level_alloc.h" #include <type_traits> -#include "y_absl/base/call_once.h" -#include "y_absl/base/config.h" -#include "y_absl/base/internal/direct_mmap.h" -#include "y_absl/base/internal/scheduling_mode.h" -#include "y_absl/base/macros.h" -#include "y_absl/base/thread_annotations.h" +#include "y_absl/base/call_once.h" +#include "y_absl/base/config.h" +#include "y_absl/base/internal/direct_mmap.h" +#include "y_absl/base/internal/scheduling_mode.h" +#include "y_absl/base/macros.h" +#include "y_absl/base/thread_annotations.h" // LowLevelAlloc requires that the platform support low-level // allocation of virtual memory. Platforms lacking this cannot use @@ -49,9 +49,9 @@ #include <cstddef> #include <new> // for placement-new -#include "y_absl/base/dynamic_annotations.h" -#include "y_absl/base/internal/raw_logging.h" -#include "y_absl/base/internal/spinlock.h" +#include "y_absl/base/dynamic_annotations.h" +#include "y_absl/base/internal/raw_logging.h" +#include "y_absl/base/internal/spinlock.h" // MAP_ANONYMOUS #if defined(__APPLE__) @@ -62,7 +62,7 @@ #endif // !MAP_ANONYMOUS #endif // __APPLE__ -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -235,7 +235,7 @@ alignas( // We must use LowLevelCallOnce here to construct the global arenas, rather than // using function-level statics, to avoid recursively invoking the scheduler. -y_absl::once_flag create_globals_once; +y_absl::once_flag create_globals_once; void CreateGlobalArenas() { new (&default_arena_storage) @@ -615,6 +615,6 @@ void *LowLevelAlloc::AllocWithArena(size_t request, Arena *arena) { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_LOW_LEVEL_ALLOC_MISSING diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_alloc.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_alloc.h index fa109d53ec..0354b1585c 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_alloc.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_alloc.h @@ -28,8 +28,8 @@ #include <cstdint> -#include "y_absl/base/attributes.h" -#include "y_absl/base/config.h" +#include "y_absl/base/attributes.h" +#include "y_absl/base/config.h" // LowLevelAlloc requires that the platform support low-level // allocation of virtual memory. Platforms lacking this cannot use @@ -52,9 +52,9 @@ #include <cstddef> -#include "y_absl/base/port.h" +#include "y_absl/base/port.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -121,6 +121,6 @@ class LowLevelAlloc { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_INTERNAL_LOW_LEVEL_ALLOC_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_alloc/ya.make b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_alloc/ya.make index fabba74677..39d05b98ea 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_alloc/ya.make +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_alloc/ya.make @@ -12,10 +12,10 @@ OWNER( LICENSE(Apache-2.0) PEERDIR( - contrib/restricted/abseil-cpp-tstring/y_absl/base - contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging - contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait - contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity + contrib/restricted/abseil-cpp-tstring/y_absl/base + contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging + contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait + contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity ) ADDINCL( @@ -24,7 +24,7 @@ ADDINCL( NO_COMPILER_WARNINGS() -SRCDIR(contrib/restricted/abseil-cpp-tstring/y_absl/base/internal) +SRCDIR(contrib/restricted/abseil-cpp-tstring/y_absl/base/internal) SRCS( low_level_alloc.cc diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_scheduling.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_scheduling.h index 61eb4ac643..01d26e0002 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_scheduling.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_scheduling.h @@ -19,8 +19,8 @@ #define ABSL_BASE_INTERNAL_LOW_LEVEL_SCHEDULING_H_ #include "y_absl/base/internal/raw_logging.h" -#include "y_absl/base/internal/scheduling_mode.h" -#include "y_absl/base/macros.h" +#include "y_absl/base/internal/scheduling_mode.h" +#include "y_absl/base/macros.h" // The following two declarations exist so SchedulingGuard may friend them with // the appropriate language linkage. These callbacks allow libc internals, such @@ -28,7 +28,7 @@ extern "C" bool __google_disable_rescheduling(void); extern "C" void __google_enable_rescheduling(bool disable_result); -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN class CondVar; class Mutex; @@ -129,6 +129,6 @@ inline SchedulingGuard::ScopedEnable::~ScopedEnable() { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_INTERNAL_LOW_LEVEL_SCHEDULING_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/per_thread_tls.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/per_thread_tls.h index 943f72a433..bdea411548 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/per_thread_tls.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/per_thread_tls.h @@ -32,7 +32,7 @@ // GCC supports it if the appropriate version of glibc is available, // which the programmer can indicate by defining ABSL_HAVE_TLS -#include "y_absl/base/port.h" // For ABSL_HAVE_TLS +#include "y_absl/base/port.h" // For ABSL_HAVE_TLS #if defined(ABSL_PER_THREAD_TLS) #error ABSL_PER_THREAD_TLS cannot be directly set diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging.cc index ea9a48c2c0..8413ca0adf 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/base/internal/raw_logging.h" +#include "y_absl/base/internal/raw_logging.h" #include <stddef.h> #include <cstdarg> @@ -20,10 +20,10 @@ #include <cstdlib> #include <cstring> -#include "y_absl/base/attributes.h" -#include "y_absl/base/config.h" -#include "y_absl/base/internal/atomic_hook.h" -#include "y_absl/base/log_severity.h" +#include "y_absl/base/attributes.h" +#include "y_absl/base/config.h" +#include "y_absl/base/internal/atomic_hook.h" +#include "y_absl/base/log_severity.h" // We know how to perform low-level writes to stderr in POSIX and Windows. For // these platforms, we define the token ABSL_LOW_LEVEL_WRITE_SUPPORTED. @@ -130,9 +130,9 @@ bool DoRawLog(char** buf, int* size, const char* format, ...) { return true; } -void RawLogVA(y_absl::LogSeverity severity, const char* file, int line, +void RawLogVA(y_absl::LogSeverity severity, const char* file, int line, const char* format, va_list ap) ABSL_PRINTF_ATTRIBUTE(4, 0); -void RawLogVA(y_absl::LogSeverity severity, const char* file, int line, +void RawLogVA(y_absl::LogSeverity severity, const char* file, int line, const char* format, va_list ap) { char buffer[kLogBufSize]; char* buf = buffer; @@ -144,8 +144,8 @@ void RawLogVA(y_absl::LogSeverity severity, const char* file, int line, #endif #ifdef ABSL_MIN_LOG_LEVEL - if (severity < static_cast<y_absl::LogSeverity>(ABSL_MIN_LOG_LEVEL) && - severity < y_absl::LogSeverity::kFatal) { + if (severity < static_cast<y_absl::LogSeverity>(ABSL_MIN_LOG_LEVEL) && + severity < y_absl::LogSeverity::kFatal) { enabled = false; } #endif @@ -177,7 +177,7 @@ void RawLogVA(y_absl::LogSeverity severity, const char* file, int line, // Abort the process after logging a FATAL message, even if the output itself // was suppressed. - if (severity == y_absl::LogSeverity::kFatal) { + if (severity == y_absl::LogSeverity::kFatal) { abort_hook(file, line, buffer, prefix_end, buffer + kLogBufSize); abort(); } @@ -209,7 +209,7 @@ void SafeWriteToStderr(const char *s, size_t len) { #endif } -void RawLog(y_absl::LogSeverity severity, const char* file, int line, +void RawLog(y_absl::LogSeverity severity, const char* file, int line, const char* format, ...) { va_list ap; va_start(ap, format); @@ -239,4 +239,4 @@ void RegisterInternalLogFunction(InternalLogFunction func) { } // namespace raw_logging_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging.h index 4d5c77003f..2839288651 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging.h @@ -21,13 +21,13 @@ #include <util/generic/string.h> -#include "y_absl/base/attributes.h" +#include "y_absl/base/attributes.h" #include "y_absl/base/config.h" -#include "y_absl/base/internal/atomic_hook.h" -#include "y_absl/base/log_severity.h" -#include "y_absl/base/macros.h" +#include "y_absl/base/internal/atomic_hook.h" +#include "y_absl/base/log_severity.h" +#include "y_absl/base/macros.h" #include "y_absl/base/optimization.h" -#include "y_absl/base/port.h" +#include "y_absl/base/port.h" // This is similar to LOG(severity) << format..., but // * it is to be used ONLY by low-level modules that can't use normal LOG() @@ -44,9 +44,9 @@ #define ABSL_RAW_LOG(severity, ...) \ do { \ constexpr const char* absl_raw_logging_internal_basename = \ - ::y_absl::raw_logging_internal::Basename(__FILE__, \ + ::y_absl::raw_logging_internal::Basename(__FILE__, \ sizeof(__FILE__) - 1); \ - ::y_absl::raw_logging_internal::RawLog(ABSL_RAW_LOGGING_INTERNAL_##severity, \ + ::y_absl::raw_logging_internal::RawLog(ABSL_RAW_LOGGING_INTERNAL_##severity, \ absl_raw_logging_internal_basename, \ __LINE__, __VA_ARGS__); \ } while (0) @@ -85,20 +85,20 @@ #define ABSL_INTERNAL_CHECK(condition, message) \ do { \ if (ABSL_PREDICT_FALSE(!(condition))) { \ - TString death_message = "Check " #condition " failed: "; \ - death_message += TString(message); \ + TString death_message = "Check " #condition " failed: "; \ + death_message += TString(message); \ ABSL_INTERNAL_LOG(FATAL, death_message); \ } \ } while (0) -#define ABSL_RAW_LOGGING_INTERNAL_INFO ::y_absl::LogSeverity::kInfo -#define ABSL_RAW_LOGGING_INTERNAL_WARNING ::y_absl::LogSeverity::kWarning -#define ABSL_RAW_LOGGING_INTERNAL_ERROR ::y_absl::LogSeverity::kError -#define ABSL_RAW_LOGGING_INTERNAL_FATAL ::y_absl::LogSeverity::kFatal +#define ABSL_RAW_LOGGING_INTERNAL_INFO ::y_absl::LogSeverity::kInfo +#define ABSL_RAW_LOGGING_INTERNAL_WARNING ::y_absl::LogSeverity::kWarning +#define ABSL_RAW_LOGGING_INTERNAL_ERROR ::y_absl::LogSeverity::kError +#define ABSL_RAW_LOGGING_INTERNAL_FATAL ::y_absl::LogSeverity::kFatal #define ABSL_RAW_LOGGING_INTERNAL_LEVEL(severity) \ - ::y_absl::NormalizeLogSeverity(severity) + ::y_absl::NormalizeLogSeverity(severity) -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace raw_logging_internal { @@ -106,7 +106,7 @@ namespace raw_logging_internal { // Logs format... at "severity" level, reporting it // as called from file:line. // This does not allocate memory or acquire locks. -void RawLog(y_absl::LogSeverity severity, const char* file, int line, +void RawLog(y_absl::LogSeverity severity, const char* file, int line, const char* format, ...) ABSL_PRINTF_ATTRIBUTE(4, 5); // Writes the provided buffer directly to stderr, in a safe, low-level manner. @@ -151,7 +151,7 @@ bool RawLoggingFullySupported(); // 'buffer' and 'buf_size' are pointers to the buffer and buffer size. If the // hook writes a prefix, it must increment *buffer and decrement *buf_size // accordingly. -using LogPrefixHook = bool (*)(y_absl::LogSeverity severity, const char* file, +using LogPrefixHook = bool (*)(y_absl::LogSeverity severity, const char* file, int line, char** buffer, int* buf_size); // Function type for a raw_logging customization hook called to abort a process @@ -170,9 +170,9 @@ using AbortHook = void (*)(const char* file, int line, const char* buf_start, // // TODO(gfalcon): When string_view no longer depends on base, change this // interface to take its message as a string_view instead. -using InternalLogFunction = void (*)(y_absl::LogSeverity severity, +using InternalLogFunction = void (*)(y_absl::LogSeverity severity, const char* file, int line, - const TString& message); + const TString& message); ABSL_INTERNAL_ATOMIC_HOOK_ATTRIBUTES ABSL_DLL extern base_internal::AtomicHook< InternalLogFunction> @@ -190,6 +190,6 @@ void RegisterInternalLogFunction(InternalLogFunction func); } // namespace raw_logging_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_INTERNAL_RAW_LOGGING_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging/ya.make b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging/ya.make index e7cfe7d216..08f768c777 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging/ya.make +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging/ya.make @@ -12,7 +12,7 @@ OWNER( LICENSE(Apache-2.0) PEERDIR( - contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity + contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity ) ADDINCL( @@ -21,7 +21,7 @@ ADDINCL( NO_COMPILER_WARNINGS() -SRCDIR(contrib/restricted/abseil-cpp-tstring/y_absl/base/internal) +SRCDIR(contrib/restricted/abseil-cpp-tstring/y_absl/base/internal) SRCS( raw_logging.cc diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/scheduling_mode.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/scheduling_mode.h index 0165e7233b..9c7af08a42 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/scheduling_mode.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/scheduling_mode.h @@ -20,7 +20,7 @@ #include "y_absl/base/config.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -53,6 +53,6 @@ enum SchedulingMode { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_INTERNAL_SCHEDULING_MODE_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/scoped_set_env.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/scoped_set_env.cc index e489272b45..7968f02db7 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/scoped_set_env.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/scoped_set_env.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/base/internal/scoped_set_env.h" +#include "y_absl/base/internal/scoped_set_env.h" #ifdef _WIN32 #include <windows.h> @@ -20,9 +20,9 @@ #include <cstdlib> -#include "y_absl/base/internal/raw_logging.h" +#include "y_absl/base/internal/raw_logging.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -78,4 +78,4 @@ ScopedSetEnv::~ScopedSetEnv() { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/scoped_set_env.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/scoped_set_env.h index 5641562f1b..69ba53e1fe 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/scoped_set_env.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/scoped_set_env.h @@ -17,11 +17,11 @@ #ifndef ABSL_BASE_INTERNAL_SCOPED_SET_ENV_H_ #define ABSL_BASE_INTERNAL_SCOPED_SET_ENV_H_ -#include <util/generic/string.h> - +#include <util/generic/string.h> + #include "y_absl/base/config.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -31,8 +31,8 @@ class ScopedSetEnv { ~ScopedSetEnv(); private: - TString var_name_; - TString old_value_; + TString var_name_; + TString old_value_; // True if the environment variable was initially not set. bool was_unset_; @@ -40,6 +40,6 @@ class ScopedSetEnv { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_INTERNAL_SCOPED_SET_ENV_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock.cc index 2ee7cde432..23bbdac64d 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock.cc @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/base/internal/spinlock.h" +#include "y_absl/base/internal/spinlock.h" #include <algorithm> #include <atomic> #include <limits> -#include "y_absl/base/attributes.h" -#include "y_absl/base/internal/atomic_hook.h" -#include "y_absl/base/internal/cycleclock.h" -#include "y_absl/base/internal/spinlock_wait.h" -#include "y_absl/base/internal/sysinfo.h" /* For NumCPUs() */ -#include "y_absl/base/call_once.h" +#include "y_absl/base/attributes.h" +#include "y_absl/base/internal/atomic_hook.h" +#include "y_absl/base/internal/cycleclock.h" +#include "y_absl/base/internal/spinlock_wait.h" +#include "y_absl/base/internal/sysinfo.h" /* For NumCPUs() */ +#include "y_absl/base/call_once.h" // Description of lock-word: // 31..00: [............................3][2][1][0] @@ -53,7 +53,7 @@ // Otherwise, bits [31..3] represent the time spent by the current lock // holder to acquire the lock. There may be outstanding waiter(s). -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -85,7 +85,7 @@ SpinLock::SpinLock(base_internal::SchedulingMode mode) uint32_t SpinLock::SpinLoop() { // We are already in the slow path of SpinLock, initialize the // adaptive_spin_count here. - ABSL_CONST_INIT static y_absl::once_flag init_adaptive_spin_count; + ABSL_CONST_INIT static y_absl::once_flag init_adaptive_spin_count; ABSL_CONST_INIT static int adaptive_spin_count = 0; base_internal::LowLevelCallOnce(&init_adaptive_spin_count, []() { adaptive_spin_count = base_internal::NumCPUs() > 1 ? 1000 : 1; @@ -226,4 +226,4 @@ uint64_t SpinLock::DecodeWaitCycles(uint32_t lock_value) { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock.h index ef88cb52c0..0c6d685966 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock.h @@ -34,18 +34,18 @@ #include <atomic> -#include "y_absl/base/attributes.h" +#include "y_absl/base/attributes.h" #include "y_absl/base/const_init.h" -#include "y_absl/base/dynamic_annotations.h" -#include "y_absl/base/internal/low_level_scheduling.h" -#include "y_absl/base/internal/raw_logging.h" -#include "y_absl/base/internal/scheduling_mode.h" -#include "y_absl/base/internal/tsan_mutex_interface.h" -#include "y_absl/base/macros.h" -#include "y_absl/base/port.h" -#include "y_absl/base/thread_annotations.h" - -namespace y_absl { +#include "y_absl/base/dynamic_annotations.h" +#include "y_absl/base/internal/low_level_scheduling.h" +#include "y_absl/base/internal/raw_logging.h" +#include "y_absl/base/internal/scheduling_mode.h" +#include "y_absl/base/internal/tsan_mutex_interface.h" +#include "y_absl/base/macros.h" +#include "y_absl/base/port.h" +#include "y_absl/base/thread_annotations.h" + +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -243,6 +243,6 @@ inline uint32_t SpinLock::TryLockInternal(uint32_t lock_value, } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_INTERNAL_SPINLOCK_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_akaros.inc b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_akaros.inc index 69955dc765..f893337e0c 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_akaros.inc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_akaros.inc @@ -16,13 +16,13 @@ #include <atomic> -#include "y_absl/base/internal/scheduling_mode.h" +#include "y_absl/base/internal/scheduling_mode.h" extern "C" { ABSL_ATTRIBUTE_WEAK void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockDelay)( std::atomic<uint32_t>* /* lock_word */, uint32_t /* value */, - int /* loop */, y_absl::base_internal::SchedulingMode /* mode */) { + int /* loop */, y_absl::base_internal::SchedulingMode /* mode */) { // In Akaros, one must take care not to call anything that could cause a // malloc(), a blocking system call, or a uthread_yield() while holding a // spinlock. Our callers assume will not call into libraries or other diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_linux.inc b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_linux.inc index 5b4480d133..4a1e285590 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_linux.inc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_linux.inc @@ -23,7 +23,7 @@ #include <cstdint> #include <ctime> -#include "y_absl/base/attributes.h" +#include "y_absl/base/attributes.h" #include "y_absl/base/internal/errno_saver.h" // The SpinLock lockword is `std::atomic<uint32_t>`. Here we assert that @@ -58,11 +58,11 @@ extern "C" { ABSL_ATTRIBUTE_WEAK void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockDelay)( std::atomic<uint32_t> *w, uint32_t value, int loop, - y_absl::base_internal::SchedulingMode) { + y_absl::base_internal::SchedulingMode) { y_absl::base_internal::ErrnoSaver errno_saver; struct timespec tm; tm.tv_sec = 0; - tm.tv_nsec = y_absl::base_internal::SpinLockSuggestedDelayNS(loop); + tm.tv_nsec = y_absl::base_internal::SpinLockSuggestedDelayNS(loop); syscall(SYS_futex, w, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, value, &tm); } diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_posix.inc b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_posix.inc index 12a9b86599..5f057ab085 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_posix.inc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_posix.inc @@ -20,14 +20,14 @@ #include <ctime> #include "y_absl/base/internal/errno_saver.h" -#include "y_absl/base/internal/scheduling_mode.h" -#include "y_absl/base/port.h" +#include "y_absl/base/internal/scheduling_mode.h" +#include "y_absl/base/port.h" extern "C" { ABSL_ATTRIBUTE_WEAK void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockDelay)( std::atomic<uint32_t>* /* lock_word */, uint32_t /* value */, int loop, - y_absl::base_internal::SchedulingMode /* mode */) { + y_absl::base_internal::SchedulingMode /* mode */) { y_absl::base_internal::ErrnoSaver errno_saver; if (loop == 0) { } else if (loop == 1) { @@ -35,7 +35,7 @@ ABSL_ATTRIBUTE_WEAK void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockDelay)( } else { struct timespec tm; tm.tv_sec = 0; - tm.tv_nsec = y_absl::base_internal::SpinLockSuggestedDelayNS(loop); + tm.tv_nsec = y_absl::base_internal::SpinLockSuggestedDelayNS(loop); nanosleep(&tm, nullptr); } } diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait.cc index 138cb3c5f0..1b726d2c0e 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait.cc @@ -19,19 +19,19 @@ #include <atomic> #include <cstdint> -#include "y_absl/base/internal/spinlock_wait.h" +#include "y_absl/base/internal/spinlock_wait.h" #if defined(_WIN32) -#include "y_absl/base/internal/spinlock_win32.inc" +#include "y_absl/base/internal/spinlock_win32.inc" #elif defined(__linux__) -#include "y_absl/base/internal/spinlock_linux.inc" +#include "y_absl/base/internal/spinlock_linux.inc" #elif defined(__akaros__) -#include "y_absl/base/internal/spinlock_akaros.inc" +#include "y_absl/base/internal/spinlock_akaros.inc" #else -#include "y_absl/base/internal/spinlock_posix.inc" +#include "y_absl/base/internal/spinlock_posix.inc" #endif -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -78,4 +78,4 @@ int SpinLockSuggestedDelayNS(int loop) { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait.h index 2e34d7026b..e994951ebb 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait.h @@ -21,9 +21,9 @@ #include <stdint.h> #include <atomic> -#include "y_absl/base/internal/scheduling_mode.h" +#include "y_absl/base/internal/scheduling_mode.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -64,7 +64,7 @@ int SpinLockSuggestedDelayNS(int loop); } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl // In some build configurations we pass --detect-odr-violations to the // gold linker. This causes it to flag weak symbol overrides as ODR @@ -77,17 +77,17 @@ void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockWake)(std::atomic<uint32_t> *w, bool all); void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockDelay)( std::atomic<uint32_t> *w, uint32_t value, int loop, - y_absl::base_internal::SchedulingMode scheduling_mode); + y_absl::base_internal::SchedulingMode scheduling_mode); } -inline void y_absl::base_internal::SpinLockWake(std::atomic<uint32_t> *w, +inline void y_absl::base_internal::SpinLockWake(std::atomic<uint32_t> *w, bool all) { ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockWake)(w, all); } -inline void y_absl::base_internal::SpinLockDelay( +inline void y_absl::base_internal::SpinLockDelay( std::atomic<uint32_t> *w, uint32_t value, int loop, - y_absl::base_internal::SchedulingMode scheduling_mode) { + y_absl::base_internal::SchedulingMode scheduling_mode) { ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockDelay) (w, value, loop, scheduling_mode); } diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait/ya.make b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait/ya.make index 902ffe394f..b90bdb19de 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait/ya.make +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait/ya.make @@ -17,7 +17,7 @@ ADDINCL( NO_COMPILER_WARNINGS() -SRCDIR(contrib/restricted/abseil-cpp-tstring/y_absl/base/internal) +SRCDIR(contrib/restricted/abseil-cpp-tstring/y_absl/base/internal) SRCS( spinlock_wait.cc diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_win32.inc b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_win32.inc index 648f74134f..6ea69285cd 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_win32.inc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_win32.inc @@ -16,7 +16,7 @@ #include <windows.h> #include <atomic> -#include "y_absl/base/internal/scheduling_mode.h" +#include "y_absl/base/internal/scheduling_mode.h" extern "C" { @@ -27,7 +27,7 @@ void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockDelay)( } else if (loop == 1) { Sleep(0); } else { - Sleep(y_absl::base_internal::SpinLockSuggestedDelayNS(loop) / 1000000); + Sleep(y_absl::base_internal::SpinLockSuggestedDelayNS(loop) / 1000000); } } diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/sysinfo.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/sysinfo.cc index 9eb0cf3f8c..204860e3fb 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/sysinfo.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/sysinfo.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/base/internal/sysinfo.h" +#include "y_absl/base/internal/sysinfo.h" -#include "y_absl/base/attributes.h" +#include "y_absl/base/attributes.h" #ifdef _WIN32 #include <windows.h> @@ -50,14 +50,14 @@ #include <utility> #include <vector> -#include "y_absl/base/call_once.h" +#include "y_absl/base/call_once.h" #include "y_absl/base/config.h" -#include "y_absl/base/internal/raw_logging.h" -#include "y_absl/base/internal/spinlock.h" -#include "y_absl/base/internal/unscaledcycleclock.h" +#include "y_absl/base/internal/raw_logging.h" +#include "y_absl/base/internal/spinlock.h" +#include "y_absl/base/internal/unscaledcycleclock.h" #include "y_absl/base/thread_annotations.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -432,7 +432,7 @@ static void FreeTID(void *v) { intptr_t tid = reinterpret_cast<intptr_t>(v); int word = tid / kBitsPerWord; uint32_t mask = ~(1u << (tid % kBitsPerWord)); - y_absl::base_internal::SpinLockHolder lock(&tid_lock); + y_absl::base_internal::SpinLockHolder lock(&tid_lock); assert(0 <= word && static_cast<size_t>(word) < tid_array->size()); (*tid_array)[word] &= mask; } @@ -445,14 +445,14 @@ static void InitGetTID() { } // Initialize tid_array. - y_absl::base_internal::SpinLockHolder lock(&tid_lock); + y_absl::base_internal::SpinLockHolder lock(&tid_lock); tid_array = new std::vector<uint32_t>(1); (*tid_array)[0] = 1; // ID 0 is never-allocated. } // Return a per-thread small integer ID from pthread's thread-specific data. pid_t GetTID() { - y_absl::call_once(tid_once, InitGetTID); + y_absl::call_once(tid_once, InitGetTID); intptr_t tid = reinterpret_cast<intptr_t>(pthread_getspecific(tid_key)); if (tid != 0) { @@ -463,7 +463,7 @@ pid_t GetTID() { size_t word; { // Search for the first unused ID. - y_absl::base_internal::SpinLockHolder lock(&tid_lock); + y_absl::base_internal::SpinLockHolder lock(&tid_lock); // First search for a word in the array that is not all ones. word = 0; while (word < tid_array->size() && ~(*tid_array)[word] == 0) { @@ -505,4 +505,4 @@ pid_t GetCachedTID() { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/sysinfo.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/sysinfo.h index 0fd7207a38..e1d1819f62 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/sysinfo.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/sysinfo.h @@ -31,9 +31,9 @@ #include <cstdint> #include "y_absl/base/config.h" -#include "y_absl/base/port.h" +#include "y_absl/base/port.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -69,6 +69,6 @@ pid_t GetCachedTID(); } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_INTERNAL_SYSINFO_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/thread_annotations.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/thread_annotations.h index b4b01a8fb4..e2b490e5b8 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/thread_annotations.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/thread_annotations.h @@ -18,7 +18,7 @@ // // WARNING: This is a backwards compatible header and it will be removed after // the migration to prefixed thread annotations is finished; please include -// "y_absl/base/thread_annotations.h". +// "y_absl/base/thread_annotations.h". // // This header file contains macro definitions for thread safety annotations // that allow developers to document the locking policies of multi-threaded diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/thread_identity.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/thread_identity.cc index b5e88ae302..c9d49f47bd 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/thread_identity.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/thread_identity.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/base/internal/thread_identity.h" +#include "y_absl/base/internal/thread_identity.h" #ifndef _WIN32 #include <pthread.h> @@ -24,18 +24,18 @@ #include <memory> #include "y_absl/base/attributes.h" -#include "y_absl/base/call_once.h" -#include "y_absl/base/internal/raw_logging.h" -#include "y_absl/base/internal/spinlock.h" +#include "y_absl/base/call_once.h" +#include "y_absl/base/internal/raw_logging.h" +#include "y_absl/base/internal/spinlock.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { #if ABSL_THREAD_IDENTITY_MODE != ABSL_THREAD_IDENTITY_MODE_USE_CPP11 namespace { // Used to co-ordinate one-time creation of our pthread_key -y_absl::once_flag init_thread_identity_key_once; +y_absl::once_flag init_thread_identity_key_once; pthread_key_t thread_identity_pthread_key; std::atomic<bool> pthread_key_initialized(false); @@ -75,7 +75,7 @@ void SetCurrentThreadIdentity( // barrier to CurrentThreadIdentity() always being async signal safe. #if ABSL_THREAD_IDENTITY_MODE == ABSL_THREAD_IDENTITY_MODE_USE_POSIX_SETSPECIFIC // NOTE: Not async-safe. But can be open-coded. - y_absl::call_once(init_thread_identity_key_once, AllocateThreadIdentityKey, + y_absl::call_once(init_thread_identity_key_once, AllocateThreadIdentityKey, reclaimer); #if defined(__EMSCRIPTEN__) || defined(__MINGW32__) @@ -102,7 +102,7 @@ void SetCurrentThreadIdentity( #elif ABSL_THREAD_IDENTITY_MODE == ABSL_THREAD_IDENTITY_MODE_USE_TLS // NOTE: Not async-safe. But can be open-coded. - y_absl::call_once(init_thread_identity_key_once, AllocateThreadIdentityKey, + y_absl::call_once(init_thread_identity_key_once, AllocateThreadIdentityKey, reclaimer); pthread_setspecific(thread_identity_pthread_key, reinterpret_cast<void*>(identity)); @@ -152,4 +152,4 @@ ThreadIdentity* CurrentThreadIdentityIfPresent() { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/thread_identity.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/thread_identity.h index 09a6c0bce1..e641f0036d 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/thread_identity.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/thread_identity.h @@ -31,10 +31,10 @@ #include <cstdint> #include "y_absl/base/config.h" -#include "y_absl/base/internal/per_thread_tls.h" +#include "y_absl/base/internal/per_thread_tls.h" #include "y_absl/base/optimization.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN struct SynchLocksHeld; @@ -45,9 +45,9 @@ namespace base_internal { class SpinLock; struct ThreadIdentity; -// Used by the implementation of y_absl::Mutex and y_absl::CondVar. +// Used by the implementation of y_absl::Mutex and y_absl::CondVar. struct PerThreadSynch { - // The internal representation of y_absl::Mutex and y_absl::CondVar rely + // The internal representation of y_absl::Mutex and y_absl::CondVar rely // on the alignment of PerThreadSynch. Both store the address of the // PerThreadSynch in the high-order bits of their internal state, // which means the low kLowZeroBits of the address of PerThreadSynch @@ -141,7 +141,7 @@ struct ThreadIdentity { // ThreadIdentity itself. PerThreadSynch per_thread_synch; - // Private: Reserved for y_absl::synchronization_internal::Waiter. + // Private: Reserved for y_absl::synchronization_internal::Waiter. struct WaiterState { alignas(void*) char data[128]; } waiter_state; @@ -260,6 +260,6 @@ inline ThreadIdentity* CurrentThreadIdentityIfPresent() { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_INTERNAL_THREAD_IDENTITY_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate.cc index dcce5aedc3..388465500d 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate.cc @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/base/internal/throw_delegate.h" +#include "y_absl/base/internal/throw_delegate.h" #include <cstdlib> #include <functional> #include <new> #include <stdexcept> -#include "y_absl/base/config.h" -#include "y_absl/base/internal/raw_logging.h" +#include "y_absl/base/config.h" +#include "y_absl/base/internal/raw_logging.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -39,7 +39,7 @@ template <typename T> #endif } // namespace -void ThrowStdLogicError(const TString& what_arg) { +void ThrowStdLogicError(const TString& what_arg) { #ifdef ABSL_HAVE_EXCEPTIONS Throw(std::logic_error(what_arg)); #else @@ -55,7 +55,7 @@ void ThrowStdLogicError(const char* what_arg) { std::abort(); #endif } -void ThrowStdInvalidArgument(const TString& what_arg) { +void ThrowStdInvalidArgument(const TString& what_arg) { #ifdef ABSL_HAVE_EXCEPTIONS Throw(std::invalid_argument(what_arg)); #else @@ -72,7 +72,7 @@ void ThrowStdInvalidArgument(const char* what_arg) { #endif } -void ThrowStdDomainError(const TString& what_arg) { +void ThrowStdDomainError(const TString& what_arg) { #ifdef ABSL_HAVE_EXCEPTIONS Throw(std::domain_error(what_arg)); #else @@ -89,7 +89,7 @@ void ThrowStdDomainError(const char* what_arg) { #endif } -void ThrowStdLengthError(const TString& what_arg) { +void ThrowStdLengthError(const TString& what_arg) { #ifdef ABSL_HAVE_EXCEPTIONS Throw(std::length_error(what_arg)); #else @@ -106,7 +106,7 @@ void ThrowStdLengthError(const char* what_arg) { #endif } -void ThrowStdOutOfRange(const TString& what_arg) { +void ThrowStdOutOfRange(const TString& what_arg) { #ifdef ABSL_HAVE_EXCEPTIONS Throw(std::out_of_range(what_arg)); #else @@ -123,7 +123,7 @@ void ThrowStdOutOfRange(const char* what_arg) { #endif } -void ThrowStdRuntimeError(const TString& what_arg) { +void ThrowStdRuntimeError(const TString& what_arg) { #ifdef ABSL_HAVE_EXCEPTIONS Throw(std::runtime_error(what_arg)); #else @@ -140,7 +140,7 @@ void ThrowStdRuntimeError(const char* what_arg) { #endif } -void ThrowStdRangeError(const TString& what_arg) { +void ThrowStdRangeError(const TString& what_arg) { #ifdef ABSL_HAVE_EXCEPTIONS Throw(std::range_error(what_arg)); #else @@ -157,7 +157,7 @@ void ThrowStdRangeError(const char* what_arg) { #endif } -void ThrowStdOverflowError(const TString& what_arg) { +void ThrowStdOverflowError(const TString& what_arg) { #ifdef ABSL_HAVE_EXCEPTIONS Throw(std::overflow_error(what_arg)); #else @@ -174,7 +174,7 @@ void ThrowStdOverflowError(const char* what_arg) { #endif } -void ThrowStdUnderflowError(const TString& what_arg) { +void ThrowStdUnderflowError(const TString& what_arg) { #ifdef ABSL_HAVE_EXCEPTIONS Throw(std::underflow_error(what_arg)); #else @@ -209,4 +209,4 @@ void ThrowStdBadAlloc() { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate.h index fda03a5db3..d66384a3c8 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate.h @@ -17,11 +17,11 @@ #ifndef ABSL_BASE_INTERNAL_THROW_DELEGATE_H_ #define ABSL_BASE_INTERNAL_THROW_DELEGATE_H_ -#include <util/generic/string.h> - +#include <util/generic/string.h> + #include "y_absl/base/config.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -39,23 +39,23 @@ namespace base_internal { // both with and without exceptions and you need to conform to an interface // that uses exceptions. -[[noreturn]] void ThrowStdLogicError(const TString& what_arg); +[[noreturn]] void ThrowStdLogicError(const TString& what_arg); [[noreturn]] void ThrowStdLogicError(const char* what_arg); -[[noreturn]] void ThrowStdInvalidArgument(const TString& what_arg); +[[noreturn]] void ThrowStdInvalidArgument(const TString& what_arg); [[noreturn]] void ThrowStdInvalidArgument(const char* what_arg); -[[noreturn]] void ThrowStdDomainError(const TString& what_arg); +[[noreturn]] void ThrowStdDomainError(const TString& what_arg); [[noreturn]] void ThrowStdDomainError(const char* what_arg); -[[noreturn]] void ThrowStdLengthError(const TString& what_arg); +[[noreturn]] void ThrowStdLengthError(const TString& what_arg); [[noreturn]] void ThrowStdLengthError(const char* what_arg); -[[noreturn]] void ThrowStdOutOfRange(const TString& what_arg); +[[noreturn]] void ThrowStdOutOfRange(const TString& what_arg); [[noreturn]] void ThrowStdOutOfRange(const char* what_arg); -[[noreturn]] void ThrowStdRuntimeError(const TString& what_arg); +[[noreturn]] void ThrowStdRuntimeError(const TString& what_arg); [[noreturn]] void ThrowStdRuntimeError(const char* what_arg); -[[noreturn]] void ThrowStdRangeError(const TString& what_arg); +[[noreturn]] void ThrowStdRangeError(const TString& what_arg); [[noreturn]] void ThrowStdRangeError(const char* what_arg); -[[noreturn]] void ThrowStdOverflowError(const TString& what_arg); +[[noreturn]] void ThrowStdOverflowError(const TString& what_arg); [[noreturn]] void ThrowStdOverflowError(const char* what_arg); -[[noreturn]] void ThrowStdUnderflowError(const TString& what_arg); +[[noreturn]] void ThrowStdUnderflowError(const TString& what_arg); [[noreturn]] void ThrowStdUnderflowError(const char* what_arg); [[noreturn]] void ThrowStdBadFunctionCall(); @@ -70,6 +70,6 @@ namespace base_internal { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_INTERNAL_THROW_DELEGATE_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate/ya.make b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate/ya.make index 1b956ad494..107f21cc6c 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate/ya.make +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate/ya.make @@ -12,8 +12,8 @@ OWNER( LICENSE(Apache-2.0) PEERDIR( - contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging - contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity + contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging + contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity ) ADDINCL( @@ -22,7 +22,7 @@ ADDINCL( NO_COMPILER_WARNINGS() -SRCDIR(contrib/restricted/abseil-cpp-tstring/y_absl/base/internal) +SRCDIR(contrib/restricted/abseil-cpp-tstring/y_absl/base/internal) SRCS( throw_delegate.cc diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/unaligned_access.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/unaligned_access.h index 7dbb23b1de..b882631a53 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/unaligned_access.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/unaligned_access.h @@ -21,7 +21,7 @@ #include <cstdint> -#include "y_absl/base/attributes.h" +#include "y_absl/base/attributes.h" #include "y_absl/base/config.h" // unaligned APIs @@ -31,7 +31,7 @@ // The unaligned API is C++ only. The declarations use C++ features // (namespaces, inline) which are absent or incompatible in C. #if defined(__cplusplus) -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -61,21 +61,21 @@ inline void UnalignedStore64(void *p, uint64_t v) { memcpy(p, &v, sizeof v); } } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #define ABSL_INTERNAL_UNALIGNED_LOAD16(_p) \ - (y_absl::base_internal::UnalignedLoad16(_p)) + (y_absl::base_internal::UnalignedLoad16(_p)) #define ABSL_INTERNAL_UNALIGNED_LOAD32(_p) \ - (y_absl::base_internal::UnalignedLoad32(_p)) + (y_absl::base_internal::UnalignedLoad32(_p)) #define ABSL_INTERNAL_UNALIGNED_LOAD64(_p) \ - (y_absl::base_internal::UnalignedLoad64(_p)) + (y_absl::base_internal::UnalignedLoad64(_p)) #define ABSL_INTERNAL_UNALIGNED_STORE16(_p, _val) \ - (y_absl::base_internal::UnalignedStore16(_p, _val)) + (y_absl::base_internal::UnalignedStore16(_p, _val)) #define ABSL_INTERNAL_UNALIGNED_STORE32(_p, _val) \ - (y_absl::base_internal::UnalignedStore32(_p, _val)) + (y_absl::base_internal::UnalignedStore32(_p, _val)) #define ABSL_INTERNAL_UNALIGNED_STORE64(_p, _val) \ - (y_absl::base_internal::UnalignedStore64(_p, _val)) + (y_absl::base_internal::UnalignedStore64(_p, _val)) #endif // defined(__cplusplus), end of unaligned API diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/unscaledcycleclock.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/unscaledcycleclock.cc index 072a9852fa..4dabba4549 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/unscaledcycleclock.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/unscaledcycleclock.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/base/internal/unscaledcycleclock.h" +#include "y_absl/base/internal/unscaledcycleclock.h" #if ABSL_USE_UNSCALED_CYCLECLOCK @@ -29,9 +29,9 @@ #endif #endif -#include "y_absl/base/internal/sysinfo.h" +#include "y_absl/base/internal/sysinfo.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -149,6 +149,6 @@ double UnscaledCycleClock::Frequency() { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_USE_UNSCALED_CYCLECLOCK diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/unscaledcycleclock.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/unscaledcycleclock.h index 618c5c7e73..686349cee7 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/unscaledcycleclock.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/unscaledcycleclock.h @@ -42,7 +42,7 @@ #include <TargetConditionals.h> #endif -#include "y_absl/base/port.h" +#include "y_absl/base/port.h" // The following platforms have an implementation of a hardware counter. #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \ @@ -85,7 +85,7 @@ #define ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY #endif -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace time_internal { class UnscaledCycleClockWrapperForGetCurrentTime; @@ -117,7 +117,7 @@ class UnscaledCycleClock { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_USE_UNSCALED_CYCLECLOCK diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity.cc index 2ae8c75aec..d4d5e02531 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity.cc @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/base/log_severity.h" +#include "y_absl/base/log_severity.h" #include <ostream> -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN -std::ostream& operator<<(std::ostream& os, y_absl::LogSeverity s) { - if (s == y_absl::NormalizeLogSeverity(s)) return os << y_absl::LogSeverityName(s); - return os << "y_absl::LogSeverity(" << static_cast<int>(s) << ")"; +std::ostream& operator<<(std::ostream& os, y_absl::LogSeverity s) { + if (s == y_absl::NormalizeLogSeverity(s)) return os << y_absl::LogSeverityName(s); + return os << "y_absl::LogSeverity(" << static_cast<int>(s) << ")"; } ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity.h index 26f20ad8e1..c9e6ccb389 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity.h @@ -18,10 +18,10 @@ #include <array> #include <ostream> -#include "y_absl/base/attributes.h" +#include "y_absl/base/attributes.h" #include "y_absl/base/config.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN // y_absl::LogSeverity @@ -64,7 +64,7 @@ ABSL_NAMESPACE_BEGIN // --my_log_level=info // --my_log_level=0 // -// Unparsing a flag produces the same result as `y_absl::LogSeverityName()` for +// Unparsing a flag produces the same result as `y_absl::LogSeverityName()` for // the standard levels and a base-ten integer otherwise. enum class LogSeverity : int { kInfo = 0, @@ -75,47 +75,47 @@ enum class LogSeverity : int { // LogSeverities() // -// Returns an iterable of all standard `y_absl::LogSeverity` values, ordered from +// Returns an iterable of all standard `y_absl::LogSeverity` values, ordered from // least to most severe. -constexpr std::array<y_absl::LogSeverity, 4> LogSeverities() { - return {{y_absl::LogSeverity::kInfo, y_absl::LogSeverity::kWarning, - y_absl::LogSeverity::kError, y_absl::LogSeverity::kFatal}}; +constexpr std::array<y_absl::LogSeverity, 4> LogSeverities() { + return {{y_absl::LogSeverity::kInfo, y_absl::LogSeverity::kWarning, + y_absl::LogSeverity::kError, y_absl::LogSeverity::kFatal}}; } // LogSeverityName() // // Returns the all-caps string representation (e.g. "INFO") of the specified // severity level if it is one of the standard levels and "UNKNOWN" otherwise. -constexpr const char* LogSeverityName(y_absl::LogSeverity s) { - return s == y_absl::LogSeverity::kInfo +constexpr const char* LogSeverityName(y_absl::LogSeverity s) { + return s == y_absl::LogSeverity::kInfo ? "INFO" - : s == y_absl::LogSeverity::kWarning + : s == y_absl::LogSeverity::kWarning ? "WARNING" - : s == y_absl::LogSeverity::kError + : s == y_absl::LogSeverity::kError ? "ERROR" - : s == y_absl::LogSeverity::kFatal ? "FATAL" : "UNKNOWN"; + : s == y_absl::LogSeverity::kFatal ? "FATAL" : "UNKNOWN"; } // NormalizeLogSeverity() // // Values less than `kInfo` normalize to `kInfo`; values greater than `kFatal` // normalize to `kError` (**NOT** `kFatal`). -constexpr y_absl::LogSeverity NormalizeLogSeverity(y_absl::LogSeverity s) { - return s < y_absl::LogSeverity::kInfo - ? y_absl::LogSeverity::kInfo - : s > y_absl::LogSeverity::kFatal ? y_absl::LogSeverity::kError : s; +constexpr y_absl::LogSeverity NormalizeLogSeverity(y_absl::LogSeverity s) { + return s < y_absl::LogSeverity::kInfo + ? y_absl::LogSeverity::kInfo + : s > y_absl::LogSeverity::kFatal ? y_absl::LogSeverity::kError : s; } -constexpr y_absl::LogSeverity NormalizeLogSeverity(int s) { - return y_absl::NormalizeLogSeverity(static_cast<y_absl::LogSeverity>(s)); +constexpr y_absl::LogSeverity NormalizeLogSeverity(int s) { + return y_absl::NormalizeLogSeverity(static_cast<y_absl::LogSeverity>(s)); } // operator<< // -// The exact representation of a streamed `y_absl::LogSeverity` is deliberately +// The exact representation of a streamed `y_absl::LogSeverity` is deliberately // unspecified; do not rely on it. -std::ostream& operator<<(std::ostream& os, y_absl::LogSeverity s); +std::ostream& operator<<(std::ostream& os, y_absl::LogSeverity s); ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_LOG_SEVERITY_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity/ya.make b/contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity/ya.make index 3e4b5634c2..b0c1b5a23f 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity/ya.make +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity/ya.make @@ -17,7 +17,7 @@ ADDINCL( NO_COMPILER_WARNINGS() -SRCDIR(contrib/restricted/abseil-cpp-tstring/y_absl/base) +SRCDIR(contrib/restricted/abseil-cpp-tstring/y_absl/base) SRCS( log_severity.cc diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/macros.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/macros.h index b09a81877d..7aba6ddfeb 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/macros.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/macros.h @@ -19,7 +19,7 @@ // // This header file defines the set of language macros used within Abseil code. // For the set of macros used to determine supported compilers and platforms, -// see y_absl/base/config.h instead. +// see y_absl/base/config.h instead. // // This code is compiled directly on many platforms, including client // platforms like Windows, Mac, and embedded systems. Before making @@ -33,8 +33,8 @@ #include "y_absl/base/attributes.h" #include "y_absl/base/config.h" -#include "y_absl/base/optimization.h" -#include "y_absl/base/port.h" +#include "y_absl/base/optimization.h" +#include "y_absl/base/port.h" // ABSL_ARRAYSIZE() // @@ -42,9 +42,9 @@ // can be used in defining new arrays. If you use this macro on a pointer by // mistake, you will get a compile-time error. #define ABSL_ARRAYSIZE(array) \ - (sizeof(::y_absl::macros_internal::ArraySizeHelper(array))) + (sizeof(::y_absl::macros_internal::ArraySizeHelper(array))) -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace macros_internal { // Note: this internal template function declaration is used by ABSL_ARRAYSIZE. @@ -53,7 +53,7 @@ template <typename T, size_t N> auto ArraySizeHelper(const T (&array)[N]) -> char (&)[N]; } // namespace macros_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl // ABSL_BAD_CALL_IF() // diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/optimization.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/optimization.h index 501530ae30..d9ae379293 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/optimization.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/optimization.h @@ -24,7 +24,7 @@ #include <assert.h> -#include "y_absl/base/config.h" +#include "y_absl/base/config.h" // ABSL_BLOCK_TAIL_CALL_OPTIMIZATION // diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/options.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/options.h index 906310cde0..d09c3a5c11 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/options.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/options.h @@ -79,7 +79,7 @@ // // ABSL_OPTION_USE_STD_ANY // -// This option controls whether y_absl::any is implemented as an alias to +// This option controls whether y_absl::any is implemented as an alias to // std::any, or as an independent implementation. // // A value of 0 means to use Abseil's implementation. This requires only C++11 @@ -93,19 +93,19 @@ // useful when you are building your entire program, including all of its // dependencies, from source. It should not be used otherwise -- for example, // if you are distributing Abseil in a binary package manager -- since in -// mode 2, y_absl::any will name a different type, with a different mangled name +// mode 2, y_absl::any will name a different type, with a different mangled name // and binary layout, depending on the compiler flags passed by the end user. // For more info, see https://abseil.io/about/design/dropin-types. // // User code should not inspect this macro. To check in the preprocessor if -// y_absl::any is a typedef of std::any, use the feature macro ABSL_USES_STD_ANY. +// y_absl::any is a typedef of std::any, use the feature macro ABSL_USES_STD_ANY. #define ABSL_OPTION_USE_STD_ANY 2 // ABSL_OPTION_USE_STD_OPTIONAL // -// This option controls whether y_absl::optional is implemented as an alias to +// This option controls whether y_absl::optional is implemented as an alias to // std::optional, or as an independent implementation. // // A value of 0 means to use Abseil's implementation. This requires only C++11 @@ -118,13 +118,13 @@ // and use an alias only if a working std::optional is available. This option // is useful when you are building your program from source. It should not be // used otherwise -- for example, if you are distributing Abseil in a binary -// package manager -- since in mode 2, y_absl::optional will name a different +// package manager -- since in mode 2, y_absl::optional will name a different // type, with a different mangled name and binary layout, depending on the // compiler flags passed by the end user. For more info, see // https://abseil.io/about/design/dropin-types. // User code should not inspect this macro. To check in the preprocessor if -// y_absl::optional is a typedef of std::optional, use the feature macro +// y_absl::optional is a typedef of std::optional, use the feature macro // ABSL_USES_STD_OPTIONAL. #define ABSL_OPTION_USE_STD_OPTIONAL 2 @@ -132,7 +132,7 @@ // ABSL_OPTION_USE_STD_STRING_VIEW // -// This option controls whether y_absl::string_view is implemented as an alias to +// This option controls whether y_absl::string_view is implemented as an alias to // std::string_view, or as an independent implementation. // // A value of 0 means to use Abseil's implementation. This requires only C++11 @@ -145,20 +145,20 @@ // and use an alias only if a working std::string_view is available. This // option is useful when you are building your program from source. It should // not be used otherwise -- for example, if you are distributing Abseil in a -// binary package manager -- since in mode 2, y_absl::string_view will name a +// binary package manager -- since in mode 2, y_absl::string_view will name a // different type, with a different mangled name and binary layout, depending on // the compiler flags passed by the end user. For more info, see // https://abseil.io/about/design/dropin-types. // // User code should not inspect this macro. To check in the preprocessor if -// y_absl::string_view is a typedef of std::string_view, use the feature macro +// y_absl::string_view is a typedef of std::string_view, use the feature macro // ABSL_USES_STD_STRING_VIEW. #define ABSL_OPTION_USE_STD_STRING_VIEW 2 // ABSL_OPTION_USE_STD_VARIANT // -// This option controls whether y_absl::variant is implemented as an alias to +// This option controls whether y_absl::variant is implemented as an alias to // std::variant, or as an independent implementation. // // A value of 0 means to use Abseil's implementation. This requires only C++11 @@ -171,13 +171,13 @@ // and use an alias only if a working std::variant is available. This option // is useful when you are building your program from source. It should not be // used otherwise -- for example, if you are distributing Abseil in a binary -// package manager -- since in mode 2, y_absl::variant will name a different +// package manager -- since in mode 2, y_absl::variant will name a different // type, with a different mangled name and binary layout, depending on the // compiler flags passed by the end user. For more info, see // https://abseil.io/about/design/dropin-types. // // User code should not inspect this macro. To check in the preprocessor if -// y_absl::variant is a typedef of std::variant, use the feature macro +// y_absl::variant is a typedef of std::variant, use the feature macro // ABSL_USES_STD_VARIANT. #define ABSL_OPTION_USE_STD_VARIANT 2 diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/port.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/port.h index 69ec795d46..607fb87d57 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/port.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/port.h @@ -18,8 +18,8 @@ #ifndef ABSL_BASE_PORT_H_ #define ABSL_BASE_PORT_H_ -#include "y_absl/base/attributes.h" -#include "y_absl/base/config.h" -#include "y_absl/base/optimization.h" +#include "y_absl/base/attributes.h" +#include "y_absl/base/config.h" +#include "y_absl/base/optimization.h" #endif // ABSL_BASE_PORT_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/thread_annotations.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/thread_annotations.h index aba5d58dc3..2713086a77 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/thread_annotations.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/thread_annotations.h @@ -37,7 +37,7 @@ #include "y_absl/base/attributes.h" #include "y_absl/base/config.h" // TODO(mbonadei): Remove after the backward compatibility period. -#include "y_absl/base/internal/thread_annotations.h" // IWYU pragma: export +#include "y_absl/base/internal/thread_annotations.h" // IWYU pragma: export // ABSL_GUARDED_BY() // @@ -309,9 +309,9 @@ // Disables warnings for a single read operation. This can be used to avoid // warnings when it is known that the read is not actually involved in a race, // but the compiler cannot confirm that. -#define ABSL_TS_UNCHECKED_READ(x) y_absl::base_internal::ts_unchecked_read(x) +#define ABSL_TS_UNCHECKED_READ(x) y_absl::base_internal::ts_unchecked_read(x) -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace base_internal { @@ -330,6 +330,6 @@ inline T& ts_unchecked_read(T& v) ABSL_NO_THREAD_SAFETY_ANALYSIS { } // namespace base_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_BASE_THREAD_ANNOTATIONS_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/ya.make b/contrib/restricted/abseil-cpp-tstring/y_absl/base/ya.make index 9e0d53060e..6f97c8cb44 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/ya.make +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/ya.make @@ -12,9 +12,9 @@ LICENSE(Apache-2.0) LICENSE_TEXTS(.yandex_meta/licenses.list.txt) PEERDIR( - contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging - contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait - contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity + contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging + contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait + contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity ) ADDINCL( |