diff options
author | thegeorg <thegeorg@yandex-team.ru> | 2022-02-10 16:45:12 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:12 +0300 |
commit | 49116032d905455a7b1c994e4a696afc885c1e71 (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/cxxsupp/libcxxabi/src | |
parent | 4e839db24a3bbc9f1c610c43d6faaaa99824dcca (diff) | |
download | ydb-49116032d905455a7b1c994e4a696afc885c1e71.tar.gz |
Restoring authorship annotation for <thegeorg@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/cxxsupp/libcxxabi/src')
14 files changed, 192 insertions, 192 deletions
diff --git a/contrib/libs/cxxsupp/libcxxabi/src/cxa_default_handlers.cpp b/contrib/libs/cxxsupp/libcxxabi/src/cxa_default_handlers.cpp index 7b29fbb95f..e0ccbe1195 100644 --- a/contrib/libs/cxxsupp/libcxxabi/src/cxa_default_handlers.cpp +++ b/contrib/libs/cxxsupp/libcxxabi/src/cxa_default_handlers.cpp @@ -112,7 +112,7 @@ namespace std { unexpected_handler -set_unexpected(unexpected_handler func) noexcept +set_unexpected(unexpected_handler func) noexcept { if (func == 0) func = default_unexpected_handler; @@ -121,7 +121,7 @@ set_unexpected(unexpected_handler func) noexcept } terminate_handler -set_terminate(terminate_handler func) noexcept +set_terminate(terminate_handler func) noexcept { if (func == 0) func = default_terminate_handler; diff --git a/contrib/libs/cxxsupp/libcxxabi/src/cxa_exception.cpp b/contrib/libs/cxxsupp/libcxxabi/src/cxa_exception.cpp index 56d0dd8fad..36388d50da 100644 --- a/contrib/libs/cxxsupp/libcxxabi/src/cxa_exception.cpp +++ b/contrib/libs/cxxsupp/libcxxabi/src/cxa_exception.cpp @@ -20,7 +20,7 @@ #include "include/atomic_support.h" // from libc++ #if __has_feature(address_sanitizer) -#include <sanitizer/asan_interface.h> +#include <sanitizer/asan_interface.h> #endif // +---------------------------+-----------------------------+---------------+ @@ -392,7 +392,7 @@ asm(" .pushsection .text.__cxa_end_cleanup,\"ax\",%progbits\n" " b _Unwind_Resume\n" #endif " .popsection"); -#endif // defined(_LIBCXXABI_ARM_EHABI) +#endif // defined(_LIBCXXABI_ARM_EHABI) /* This routine can catch foreign or native exceptions. If native, the exception diff --git a/contrib/libs/cxxsupp/libcxxabi/src/cxa_exception.h b/contrib/libs/cxxsupp/libcxxabi/src/cxa_exception.h index 7f92ff3bd5..7a32fb653b 100644 --- a/contrib/libs/cxxsupp/libcxxabi/src/cxa_exception.h +++ b/contrib/libs/cxxsupp/libcxxabi/src/cxa_exception.h @@ -161,4 +161,4 @@ extern "C" _LIBCXXABI_FUNC_VIS void __cxa_free_dependent_exception (void * depen } // namespace __cxxabiv1 -#endif // _CXA_EXCEPTION_H +#endif // _CXA_EXCEPTION_H diff --git a/contrib/libs/cxxsupp/libcxxabi/src/cxa_handlers.cpp b/contrib/libs/cxxsupp/libcxxabi/src/cxa_handlers.cpp index 8679f02fdb..344250dde0 100644 --- a/contrib/libs/cxxsupp/libcxxabi/src/cxa_handlers.cpp +++ b/contrib/libs/cxxsupp/libcxxabi/src/cxa_handlers.cpp @@ -23,7 +23,7 @@ namespace std { unexpected_handler -get_unexpected() noexcept +get_unexpected() noexcept { return __libcpp_atomic_load(&__cxa_unexpected_handler, _AO_Acquire); } @@ -44,18 +44,18 @@ unexpected() } terminate_handler -get_terminate() noexcept +get_terminate() noexcept { return __libcpp_atomic_load(&__cxa_terminate_handler, _AO_Acquire); } void -__terminate(terminate_handler func) noexcept +__terminate(terminate_handler func) noexcept { #ifndef _LIBCXXABI_NO_EXCEPTIONS try { -#endif // _LIBCXXABI_NO_EXCEPTIONS +#endif // _LIBCXXABI_NO_EXCEPTIONS func(); // handler should not return abort_message("terminate_handler unexpectedly returned"); @@ -66,12 +66,12 @@ __terminate(terminate_handler func) noexcept // handler should not throw exception abort_message("terminate_handler unexpectedly threw an exception"); } -#endif // _LIBCXXABI_NO_EXCEPTIONS +#endif // _LIBCXXABI_NO_EXCEPTIONS } __attribute__((noreturn)) void -terminate() noexcept +terminate() noexcept { #ifndef _LIBCXXABI_NO_EXCEPTIONS // If there might be an uncaught exception @@ -93,7 +93,7 @@ terminate() noexcept } new_handler -get_new_handler() noexcept +get_new_handler() noexcept { return __libcpp_atomic_load(&__cxa_new_handler, _AO_Acquire); } diff --git a/contrib/libs/cxxsupp/libcxxabi/src/cxa_handlers.h b/contrib/libs/cxxsupp/libcxxabi/src/cxa_handlers.h index b129859be4..3d8dc6b2de 100644 --- a/contrib/libs/cxxsupp/libcxxabi/src/cxa_handlers.h +++ b/contrib/libs/cxxsupp/libcxxabi/src/cxa_handlers.h @@ -25,7 +25,7 @@ __unexpected(unexpected_handler func); _LIBCXXABI_HIDDEN _LIBCXXABI_NORETURN void -__terminate(terminate_handler func) noexcept; +__terminate(terminate_handler func) noexcept; } // std @@ -52,4 +52,4 @@ _LIBCXXABI_DATA_VIS extern void (*__cxa_new_handler)(); } // extern "C" -#endif // _CXA_HANDLERS_H +#endif // _CXA_HANDLERS_H diff --git a/contrib/libs/cxxsupp/libcxxabi/src/cxa_personality.cpp b/contrib/libs/cxxsupp/libcxxabi/src/cxa_personality.cpp index 1b051b8ff5..f6e135f137 100644 --- a/contrib/libs/cxxsupp/libcxxabi/src/cxa_personality.cpp +++ b/contrib/libs/cxxsupp/libcxxabi/src/cxa_personality.cpp @@ -88,7 +88,7 @@ extern "C" EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, | +-------------+---------------------------------+------------------------------+ | | ... | +----------------------------------------------------------------------------------+ -#endif // __USING_SJLJ_EXCEPTIONS__ +#endif // __USING_SJLJ_EXCEPTIONS__ +---------------------------------------------------------------------+ | Beginning of Action Table ttypeIndex == 0 : cleanup | | ... ttypeIndex > 0 : catch | @@ -241,11 +241,11 @@ readSLEB128(const uint8_t** data) /// @link http://dwarfstd.org/Dwarf3.pdf @unlink /// @param data reference variable holding memory pointer to decode from /// @param encoding dwarf encoding type -/// @param base for adding relative offset, default to 0 +/// @param base for adding relative offset, default to 0 /// @returns decoded value static uintptr_t -readEncodedPointer(const uint8_t** data, uint8_t encoding, uintptr_t base = 0) +readEncodedPointer(const uint8_t** data, uint8_t encoding, uintptr_t base = 0) { uintptr_t result = 0; if (encoding == DW_EH_PE_omit) @@ -296,11 +296,11 @@ readEncodedPointer(const uint8_t** data, uint8_t encoding, uintptr_t base = 0) if (result) result += (uintptr_t)(*data); break; - case DW_EH_PE_datarel: - assert((base != 0) && "DW_EH_PE_datarel is invalid with a base of 0"); - if (result) - result += base; - break; + case DW_EH_PE_datarel: + assert((base != 0) && "DW_EH_PE_datarel is invalid with a base of 0"); + if (result) + result += base; + break; case DW_EH_PE_textrel: case DW_EH_PE_funcrel: case DW_EH_PE_aligned: @@ -353,7 +353,7 @@ static const void* read_target2_value(const void* ptr) static const __shim_type_info* get_shim_type_info(uint64_t ttypeIndex, const uint8_t* classInfo, uint8_t ttypeEncoding, bool native_exception, - _Unwind_Exception* unwind_exception, uintptr_t /*base*/ = 0) + _Unwind_Exception* unwind_exception, uintptr_t /*base*/ = 0) { if (classInfo == 0) { @@ -376,7 +376,7 @@ static const __shim_type_info* get_shim_type_info(uint64_t ttypeIndex, const uint8_t* classInfo, uint8_t ttypeEncoding, bool native_exception, - _Unwind_Exception* unwind_exception, uintptr_t base = 0) + _Unwind_Exception* unwind_exception, uintptr_t base = 0) { if (classInfo == 0) { @@ -405,8 +405,8 @@ get_shim_type_info(uint64_t ttypeIndex, const uint8_t* classInfo, call_terminate(native_exception, unwind_exception); } classInfo -= ttypeIndex; - return (const __shim_type_info*)readEncodedPointer(&classInfo, - ttypeEncoding, base); + return (const __shim_type_info*)readEncodedPointer(&classInfo, + ttypeEncoding, base); } #endif // !defined(_LIBCXXABI_ARM_EHABI) @@ -424,8 +424,8 @@ static bool exception_spec_can_catch(int64_t specIndex, const uint8_t* classInfo, uint8_t ttypeEncoding, const __shim_type_info* excpType, - void* adjustedPtr, _Unwind_Exception* unwind_exception, - uintptr_t /*base*/ = 0) + void* adjustedPtr, _Unwind_Exception* unwind_exception, + uintptr_t /*base*/ = 0) { if (classInfo == 0) { @@ -470,8 +470,8 @@ static bool exception_spec_can_catch(int64_t specIndex, const uint8_t* classInfo, uint8_t ttypeEncoding, const __shim_type_info* excpType, - void* adjustedPtr, _Unwind_Exception* unwind_exception, - uintptr_t base = 0) + void* adjustedPtr, _Unwind_Exception* unwind_exception, + uintptr_t base = 0) { if (classInfo == 0) { @@ -493,8 +493,8 @@ exception_spec_can_catch(int64_t specIndex, const uint8_t* classInfo, classInfo, ttypeEncoding, true, - unwind_exception, - base); + unwind_exception, + base); void* tempPtr = adjustedPtr; if (catchType->can_catch(excpType, tempPtr)) return false; @@ -540,9 +540,9 @@ set_registers(_Unwind_Exception* unwind_exception, _Unwind_Context* context, { #if defined(__USING_SJLJ_EXCEPTIONS__) #define __builtin_eh_return_data_regno(regno) regno -#elif defined(__ibmxl__) -// IBM xlclang++ compiler does not support __builtin_eh_return_data_regno. -#define __builtin_eh_return_data_regno(regno) regno + 3 +#elif defined(__ibmxl__) +// IBM xlclang++ compiler does not support __builtin_eh_return_data_regno. +#define __builtin_eh_return_data_regno(regno) regno + 3 #endif _Unwind_SetGR(context, __builtin_eh_return_data_regno(0), reinterpret_cast<uintptr_t>(unwind_exception)); @@ -622,11 +622,11 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions, return; } results.languageSpecificData = lsda; -#if defined(_AIX) - uintptr_t base = _Unwind_GetDataRelBase(context); -#else - uintptr_t base = 0; -#endif +#if defined(_AIX) + uintptr_t base = _Unwind_GetDataRelBase(context); +#else + uintptr_t base = 0; +#endif // Get the current instruction pointer and offset it before next // instruction in the current frame which threw the exception. uintptr_t ip = _Unwind_GetIP(context) - 1; @@ -645,14 +645,14 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions, // ip is 1-based index into call site table #else // !__USING_SJLJ_EXCEPTIONS__ uintptr_t ipOffset = ip - funcStart; -#endif // !defined(_USING_SLJL_EXCEPTIONS__) +#endif // !defined(_USING_SLJL_EXCEPTIONS__) const uint8_t* classInfo = NULL; // Note: See JITDwarfEmitter::EmitExceptionTable(...) for corresponding // dwarf emission // Parse LSDA header. uint8_t lpStartEncoding = *lsda++; - const uint8_t* lpStart = - (const uint8_t*)readEncodedPointer(&lsda, lpStartEncoding, base); + const uint8_t* lpStart = + (const uint8_t*)readEncodedPointer(&lsda, lpStartEncoding, base); if (lpStart == 0) lpStart = (const uint8_t*)funcStart; uint8_t ttypeEncoding = *lsda++; @@ -691,7 +691,7 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions, uintptr_t landingPad = readULEB128(&callSitePtr); uintptr_t actionEntry = readULEB128(&callSitePtr); if (--ip == 0) -#endif // __USING_SJLJ_EXCEPTIONS__ +#endif // __USING_SJLJ_EXCEPTIONS__ { // Found the call site containing ip. #ifndef __USING_SJLJ_EXCEPTIONS__ @@ -704,7 +704,7 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions, landingPad = (uintptr_t)lpStart + landingPad; #else // __USING_SJLJ_EXCEPTIONS__ ++landingPad; -#endif // __USING_SJLJ_EXCEPTIONS__ +#endif // __USING_SJLJ_EXCEPTIONS__ results.landingPad = landingPad; if (actionEntry == 0) { @@ -729,8 +729,8 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions, const __shim_type_info* catchType = get_shim_type_info(static_cast<uint64_t>(ttypeIndex), classInfo, ttypeEncoding, - native_exception, unwind_exception, - base); + native_exception, unwind_exception, + base); if (catchType == 0) { // Found catch (...) catches everything, including @@ -791,8 +791,8 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions, } if (exception_spec_can_catch(ttypeIndex, classInfo, ttypeEncoding, excpType, - adjustedPtr, - unwind_exception, base)) + adjustedPtr, + unwind_exception, base)) { // Native exception caught by exception // specification. @@ -840,7 +840,7 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions, // Possible stack corruption. call_terminate(native_exception, unwind_exception); } -#endif // !__USING_SJLJ_EXCEPTIONS__ +#endif // !__USING_SJLJ_EXCEPTIONS__ } // there might be some tricky cases which break out of this loop // It is possible that no eh table entry specify how to handle @@ -931,15 +931,15 @@ __gxx_personality_v0 // Jump to the handler. set_registers(unwind_exception, context, results); - // Cache base for calculating the address of ttype in - // __cxa_call_unexpected. - if (results.ttypeIndex < 0) { -#if defined(_AIX) - exception_header->catchTemp = (void *)_Unwind_GetDataRelBase(context); -#else - exception_header->catchTemp = 0; -#endif - } + // Cache base for calculating the address of ttype in + // __cxa_call_unexpected. + if (results.ttypeIndex < 0) { +#if defined(_AIX) + exception_header->catchTemp = (void *)_Unwind_GetDataRelBase(context); +#else + exception_header->catchTemp = 0; +#endif + } return _URC_INSTALL_CONTEXT; } @@ -969,16 +969,16 @@ __gxx_personality_v0 assert(actions & _UA_CLEANUP_PHASE); assert(results.reason == _URC_HANDLER_FOUND); set_registers(unwind_exception, context, results); - // Cache base for calculating the address of ttype in __cxa_call_unexpected. - if (results.ttypeIndex < 0) { - __cxa_exception* exception_header = - (__cxa_exception*)(unwind_exception + 1) - 1; -#if defined(_AIX) - exception_header->catchTemp = (void *)_Unwind_GetDataRelBase(context); -#else - exception_header->catchTemp = 0; -#endif - } + // Cache base for calculating the address of ttype in __cxa_call_unexpected. + if (results.ttypeIndex < 0) { + __cxa_exception* exception_header = + (__cxa_exception*)(unwind_exception + 1) - 1; +#if defined(_AIX) + exception_header->catchTemp = (void *)_Unwind_GetDataRelBase(context); +#else + exception_header->catchTemp = 0; +#endif + } return _URC_INSTALL_CONTEXT; } @@ -1114,14 +1114,14 @@ __gxx_personality_v0(_Unwind_State state, // Either we didn't do a phase 1 search (due to forced unwinding), or // phase 1 reported no catching-handlers. // Search for a (non-catching) cleanup - if (is_force_unwinding) - scan_eh_tab( - results, - static_cast<_Unwind_Action>(_UA_CLEANUP_PHASE | _UA_FORCE_UNWIND), - native_exception, unwind_exception, context); - else - scan_eh_tab(results, _UA_CLEANUP_PHASE, native_exception, - unwind_exception, context); + if (is_force_unwinding) + scan_eh_tab( + results, + static_cast<_Unwind_Action>(_UA_CLEANUP_PHASE | _UA_FORCE_UNWIND), + native_exception, unwind_exception, context); + else + scan_eh_tab(results, _UA_CLEANUP_PHASE, native_exception, + unwind_exception, context); if (results.reason == _URC_HANDLER_FOUND) { // Found a non-catching handler @@ -1165,8 +1165,8 @@ __cxa_call_unexpected(void* arg) __cxa_exception* old_exception_header = 0; int64_t ttypeIndex; const uint8_t* lsda; - uintptr_t base = 0; - + uintptr_t base = 0; + if (native_old_exception) { old_exception_header = (__cxa_exception*)(unwind_exception+1) - 1; @@ -1180,7 +1180,7 @@ __cxa_call_unexpected(void* arg) #else ttypeIndex = old_exception_header->handlerSwitchValue; lsda = old_exception_header->languageSpecificData; - base = (uintptr_t)old_exception_header->catchTemp; + base = (uintptr_t)old_exception_header->catchTemp; #endif } else @@ -1204,13 +1204,13 @@ __cxa_call_unexpected(void* arg) // Have: // old_exception_header->languageSpecificData // old_exception_header->actionRecord - // old_exception_header->catchTemp, base for calculating ttype + // old_exception_header->catchTemp, base for calculating ttype // Need // const uint8_t* classInfo // uint8_t ttypeEncoding uint8_t lpStartEncoding = *lsda++; - const uint8_t* lpStart = - (const uint8_t*)readEncodedPointer(&lsda, lpStartEncoding, base); + const uint8_t* lpStart = + (const uint8_t*)readEncodedPointer(&lsda, lpStartEncoding, base); (void)lpStart; // purposefully unused. Just needed to increment lsda. uint8_t ttypeEncoding = *lsda++; if (ttypeEncoding == DW_EH_PE_omit) @@ -1237,8 +1237,8 @@ __cxa_call_unexpected(void* arg) ((__cxa_dependent_exception*)new_exception_header)->primaryException : new_exception_header + 1; if (!exception_spec_can_catch(ttypeIndex, classInfo, ttypeEncoding, - excpType, adjustedPtr, - unwind_exception, base)) + excpType, adjustedPtr, + unwind_exception, base)) { // We need to __cxa_end_catch, but for the old exception, // not the new one. This is a little tricky ... @@ -1267,8 +1267,8 @@ __cxa_call_unexpected(void* arg) std::bad_exception be; adjustedPtr = &be; if (!exception_spec_can_catch(ttypeIndex, classInfo, ttypeEncoding, - excpType, adjustedPtr, - unwind_exception, base)) + excpType, adjustedPtr, + unwind_exception, base)) { // We need to __cxa_end_catch for both the old exception and the // new exception. Technically we should do it in that order. @@ -1284,15 +1284,15 @@ __cxa_call_unexpected(void* arg) std::__terminate(t_handler); } -#if defined(_AIX) -// Personality routine for EH using the range table. Make it an alias of -// __gxx_personality_v0(). -_LIBCXXABI_FUNC_VIS _Unwind_Reason_Code __xlcxx_personality_v1( - int version, _Unwind_Action actions, uint64_t exceptionClass, - _Unwind_Exception* unwind_exception, _Unwind_Context* context) - __attribute__((__alias__("__gxx_personality_v0"))); -#endif - +#if defined(_AIX) +// Personality routine for EH using the range table. Make it an alias of +// __gxx_personality_v0(). +_LIBCXXABI_FUNC_VIS _Unwind_Reason_Code __xlcxx_personality_v1( + int version, _Unwind_Action actions, uint64_t exceptionClass, + _Unwind_Exception* unwind_exception, _Unwind_Context* context) + __attribute__((__alias__("__gxx_personality_v0"))); +#endif + } // extern "C" } // __cxxabiv1 diff --git a/contrib/libs/cxxsupp/libcxxabi/src/demangle/ItaniumDemangle.h b/contrib/libs/cxxsupp/libcxxabi/src/demangle/ItaniumDemangle.h index f1937c04a5..85e1511346 100644 --- a/contrib/libs/cxxsupp/libcxxabi/src/demangle/ItaniumDemangle.h +++ b/contrib/libs/cxxsupp/libcxxabi/src/demangle/ItaniumDemangle.h @@ -110,13 +110,13 @@ DEMANGLE_NAMESPACE_BEGIN -template <class T, size_t N> class PODSmallVector { +template <class T, size_t N> class PODSmallVector { static_assert(std::is_pod<T>::value, "T is required to be a plain old data type"); - T *First = nullptr; - T *Last = nullptr; - T *Cap = nullptr; + T *First = nullptr; + T *Last = nullptr; + T *Cap = nullptr; T Inline[N] = {0}; bool isInline() const { return First == Inline; } @@ -130,13 +130,13 @@ template <class T, size_t N> class PODSmallVector { void reserve(size_t NewCap) { size_t S = size(); if (isInline()) { - auto *Tmp = static_cast<T *>(std::malloc(NewCap * sizeof(T))); + auto *Tmp = static_cast<T *>(std::malloc(NewCap * sizeof(T))); if (Tmp == nullptr) std::terminate(); std::copy(First, Last, Tmp); First = Tmp; } else { - First = static_cast<T *>(std::realloc(First, NewCap * sizeof(T))); + First = static_cast<T *>(std::realloc(First, NewCap * sizeof(T))); if (First == nullptr) std::terminate(); } @@ -147,10 +147,10 @@ template <class T, size_t N> class PODSmallVector { public: PODSmallVector() : First(Inline), Last(First), Cap(Inline + N) {} - PODSmallVector(const PODSmallVector &) = delete; - PODSmallVector &operator=(const PODSmallVector &) = delete; + PODSmallVector(const PODSmallVector &) = delete; + PODSmallVector &operator=(const PODSmallVector &) = delete; - PODSmallVector(PODSmallVector &&Other) : PODSmallVector() { + PODSmallVector(PODSmallVector &&Other) : PODSmallVector() { if (Other.isInline()) { std::copy(Other.begin(), Other.end(), First); Last = First + Other.size(); @@ -164,7 +164,7 @@ public: Other.clearInline(); } - PODSmallVector &operator=(PODSmallVector &&Other) { + PODSmallVector &operator=(PODSmallVector &&Other) { if (Other.isInline()) { if (!isInline()) { std::free(First); @@ -191,14 +191,14 @@ public: return *this; } - // NOLINTNEXTLINE(readability-identifier-naming) - void push_back(const T &Elem) { + // NOLINTNEXTLINE(readability-identifier-naming) + void push_back(const T &Elem) { if (Last == Cap) reserve(size() * 2); *Last++ = Elem; } - // NOLINTNEXTLINE(readability-identifier-naming) + // NOLINTNEXTLINE(readability-identifier-naming) void pop_back() { assert(Last != First && "Popping empty vector!"); --Last; @@ -209,16 +209,16 @@ public: Last = First + Index; } - T *begin() { return First; } - T *end() { return Last; } + T *begin() { return First; } + T *end() { return Last; } bool empty() const { return First == Last; } size_t size() const { return static_cast<size_t>(Last - First); } - T &back() { + T &back() { assert(Last != First && "Calling back() on empty vector!"); return *(Last - 1); } - T &operator[](size_t Index) { + T &operator[](size_t Index) { assert(Index < size() && "Invalid access!"); return *(begin() + Index); } @@ -397,19 +397,19 @@ public: class VendorExtQualType final : public Node { const Node *Ty; StringView Ext; - const Node *TA; + const Node *TA; public: - VendorExtQualType(const Node *Ty_, StringView Ext_, const Node *TA_) - : Node(KVendorExtQualType), Ty(Ty_), Ext(Ext_), TA(TA_) {} + VendorExtQualType(const Node *Ty_, StringView Ext_, const Node *TA_) + : Node(KVendorExtQualType), Ty(Ty_), Ext(Ext_), TA(TA_) {} - template <typename Fn> void match(Fn F) const { F(Ty, Ext, TA); } + template <typename Fn> void match(Fn F) const { F(Ty, Ext, TA); } void printLeft(OutputBuffer &OB) const override { Ty->print(OB); OB += " "; OB += Ext; - if (TA != nullptr) + if (TA != nullptr) TA->print(OB); } }; @@ -649,14 +649,14 @@ class ReferenceType : public Node { // rule here is rvalue ref to rvalue ref collapses to a rvalue ref, and any // other combination collapses to a lvalue ref. // - // A combination of a TemplateForwardReference and a back-ref Substitution + // A combination of a TemplateForwardReference and a back-ref Substitution // from an ill-formed string may have created a cycle; use cycle detection to // avoid looping forever. std::pair<ReferenceKind, const Node *> collapse(OutputBuffer &OB) const { auto SoFar = std::make_pair(RK, Pointee); // Track the chain of nodes for the Floyd's 'tortoise and hare' // cycle-detection algorithm, since getSyntaxNode(S) is impure - PODSmallVector<const Node *, 8> Prev; + PODSmallVector<const Node *, 8> Prev; for (;;) { const Node *SN = SoFar.second->getSyntaxNode(OB); if (SN->getKind() != KReferenceType) @@ -3723,17 +3723,17 @@ Node *AbstractManglingParser<Derived, Alloc>::parseQualifiedType() { return make<ObjCProtoName>(Child, Proto); } - Node *TA = nullptr; - if (look() == 'I') { - TA = getDerived().parseTemplateArgs(); - if (TA == nullptr) - return nullptr; - } - + Node *TA = nullptr; + if (look() == 'I') { + TA = getDerived().parseTemplateArgs(); + if (TA == nullptr) + return nullptr; + } + Node *Child = getDerived().parseQualifiedType(); if (Child == nullptr) return nullptr; - return make<VendorExtQualType>(Child, Qual, TA); + return make<VendorExtQualType>(Child, Qual, TA); } Qualifiers Quals = parseCVQualifiers(); @@ -3906,7 +3906,7 @@ Node *AbstractManglingParser<Derived, Alloc>::parseType() { // ::= Dh # IEEE 754r half-precision floating point (16 bits) case 'h': First += 2; - return make<NameType>("half"); + return make<NameType>("half"); // ::= DF <number> _ # ISO/IEC TS 18661 binary floating point (N bits) case 'F': { First += 2; @@ -5268,18 +5268,18 @@ Node *AbstractManglingParser<Derived, Alloc>::parseEncoding() { class SaveTemplateParams { AbstractManglingParser *Parser; decltype(TemplateParams) OldParams; - decltype(OuterTemplateParams) OldOuterParams; + decltype(OuterTemplateParams) OldOuterParams; public: SaveTemplateParams(AbstractManglingParser *TheParser) : Parser(TheParser) { OldParams = std::move(Parser->TemplateParams); - OldOuterParams = std::move(Parser->OuterTemplateParams); + OldOuterParams = std::move(Parser->OuterTemplateParams); Parser->TemplateParams.clear(); - Parser->OuterTemplateParams.clear(); + Parser->OuterTemplateParams.clear(); } ~SaveTemplateParams() { Parser->TemplateParams = std::move(OldParams); - Parser->OuterTemplateParams = std::move(OldOuterParams); + Parser->OuterTemplateParams = std::move(OldOuterParams); } } SaveTemplateParams(this); diff --git a/contrib/libs/cxxsupp/libcxxabi/src/demangle/StringView.h b/contrib/libs/cxxsupp/libcxxabi/src/demangle/StringView.h index b6b2e7aee0..1e4d3803f0 100644 --- a/contrib/libs/cxxsupp/libcxxabi/src/demangle/StringView.h +++ b/contrib/libs/cxxsupp/libcxxabi/src/demangle/StringView.h @@ -36,9 +36,9 @@ public: StringView(const char *Str) : First(Str), Last(Str + std::strlen(Str)) {} StringView() : First(nullptr), Last(nullptr) {} - StringView substr(size_t Pos, size_t Len = npos) const { - assert(Pos <= size()); - return StringView(begin() + Pos, std::min(Len, size() - Pos)); + StringView substr(size_t Pos, size_t Len = npos) const { + assert(Pos <= size()); + return StringView(begin() + Pos, std::min(Len, size() - Pos)); } size_t find(char C, size_t From = 0) const { diff --git a/contrib/libs/cxxsupp/libcxxabi/src/private_typeinfo.cpp b/contrib/libs/cxxsupp/libcxxabi/src/private_typeinfo.cpp index a20935b45f..e1086661c0 100644 --- a/contrib/libs/cxxsupp/libcxxabi/src/private_typeinfo.cpp +++ b/contrib/libs/cxxsupp/libcxxabi/src/private_typeinfo.cpp @@ -679,7 +679,7 @@ __dynamic_cast(const void *static_ptr, const __class_type_info *static_type, info.number_of_dst_type = 1; dynamic_type->search_above_dst(&info, dynamic_ptr, dynamic_ptr, public_path, true); } -#endif // _LIBCXXABI_FORGIVING_DYNAMIC_CAST +#endif // _LIBCXXABI_FORGIVING_DYNAMIC_CAST // Query the search. if (info.path_dst_ptr_to_static_ptr == public_path) dst_ptr = dynamic_ptr; @@ -707,7 +707,7 @@ __dynamic_cast(const void *static_ptr, const __class_type_info *static_type, info = {dst_type, static_ptr, static_type, src2dst_offset, 0}; dynamic_type->search_below_dst(&info, dynamic_ptr, public_path, true); } -#endif // _LIBCXXABI_FORGIVING_DYNAMIC_CAST +#endif // _LIBCXXABI_FORGIVING_DYNAMIC_CAST // Query the search. switch (info.number_to_static_ptr) { diff --git a/contrib/libs/cxxsupp/libcxxabi/src/private_typeinfo.h b/contrib/libs/cxxsupp/libcxxabi/src/private_typeinfo.h index 978fbbcb3a..622e09cc24 100644 --- a/contrib/libs/cxxsupp/libcxxabi/src/private_typeinfo.h +++ b/contrib/libs/cxxsupp/libcxxabi/src/private_typeinfo.h @@ -248,4 +248,4 @@ public: } // __cxxabiv1 -#endif // __PRIVATE_TYPEINFO_H_ +#endif // __PRIVATE_TYPEINFO_H_ diff --git a/contrib/libs/cxxsupp/libcxxabi/src/stdlib_exception.cpp b/contrib/libs/cxxsupp/libcxxabi/src/stdlib_exception.cpp index c3048cde07..b1fc21f412 100644 --- a/contrib/libs/cxxsupp/libcxxabi/src/stdlib_exception.cpp +++ b/contrib/libs/cxxsupp/libcxxabi/src/stdlib_exception.cpp @@ -14,22 +14,22 @@ namespace std // exception -exception::~exception() noexcept +exception::~exception() noexcept { } -const char* exception::what() const noexcept +const char* exception::what() const noexcept { return "std::exception"; } // bad_exception -bad_exception::~bad_exception() noexcept +bad_exception::~bad_exception() noexcept { } -const char* bad_exception::what() const noexcept +const char* bad_exception::what() const noexcept { return "std::bad_exception"; } @@ -37,32 +37,32 @@ const char* bad_exception::what() const noexcept // bad_alloc -bad_alloc::bad_alloc() noexcept +bad_alloc::bad_alloc() noexcept { } -bad_alloc::~bad_alloc() noexcept +bad_alloc::~bad_alloc() noexcept { } const char* -bad_alloc::what() const noexcept +bad_alloc::what() const noexcept { return "std::bad_alloc"; } // bad_array_new_length -bad_array_new_length::bad_array_new_length() noexcept +bad_array_new_length::bad_array_new_length() noexcept { } -bad_array_new_length::~bad_array_new_length() noexcept +bad_array_new_length::~bad_array_new_length() noexcept { } const char* -bad_array_new_length::what() const noexcept +bad_array_new_length::what() const noexcept { return "bad_array_new_length"; } diff --git a/contrib/libs/cxxsupp/libcxxabi/src/stdlib_new_delete.cpp b/contrib/libs/cxxsupp/libcxxabi/src/stdlib_new_delete.cpp index 49524f9b94..4a664e15a5 100644 --- a/contrib/libs/cxxsupp/libcxxabi/src/stdlib_new_delete.cpp +++ b/contrib/libs/cxxsupp/libcxxabi/src/stdlib_new_delete.cpp @@ -12,8 +12,8 @@ #include <new> #include <cstdlib> -#if !defined(_THROW_BAD_ALLOC) || !defined(_LIBCXXABI_WEAK) -#error The _THROW_BAD_ALLOC and _LIBCXXABI_WEAK libc++ macros must \ +#if !defined(_THROW_BAD_ALLOC) || !defined(_LIBCXXABI_WEAK) +#error The _THROW_BAD_ALLOC and _LIBCXXABI_WEAK libc++ macros must \ already be defined by libc++. #endif // Implement all new and delete operators as weak definitions @@ -46,20 +46,20 @@ operator new(std::size_t size) _THROW_BAD_ALLOC _LIBCXXABI_WEAK void* -operator new(size_t size, const std::nothrow_t&) noexcept +operator new(size_t size, const std::nothrow_t&) noexcept { void* p = nullptr; #ifndef _LIBCXXABI_NO_EXCEPTIONS try { -#endif // _LIBCXXABI_NO_EXCEPTIONS +#endif // _LIBCXXABI_NO_EXCEPTIONS p = ::operator new(size); #ifndef _LIBCXXABI_NO_EXCEPTIONS } catch (...) { } -#endif // _LIBCXXABI_NO_EXCEPTIONS +#endif // _LIBCXXABI_NO_EXCEPTIONS return p; } @@ -72,61 +72,61 @@ operator new[](size_t size) _THROW_BAD_ALLOC _LIBCXXABI_WEAK void* -operator new[](size_t size, const std::nothrow_t&) noexcept +operator new[](size_t size, const std::nothrow_t&) noexcept { void* p = nullptr; #ifndef _LIBCXXABI_NO_EXCEPTIONS try { -#endif // _LIBCXXABI_NO_EXCEPTIONS +#endif // _LIBCXXABI_NO_EXCEPTIONS p = ::operator new[](size); #ifndef _LIBCXXABI_NO_EXCEPTIONS } catch (...) { } -#endif // _LIBCXXABI_NO_EXCEPTIONS +#endif // _LIBCXXABI_NO_EXCEPTIONS return p; } _LIBCXXABI_WEAK void -operator delete(void* ptr) noexcept +operator delete(void* ptr) noexcept { ::free(ptr); } _LIBCXXABI_WEAK void -operator delete(void* ptr, const std::nothrow_t&) noexcept +operator delete(void* ptr, const std::nothrow_t&) noexcept { ::operator delete(ptr); } _LIBCXXABI_WEAK void -operator delete(void* ptr, size_t) noexcept +operator delete(void* ptr, size_t) noexcept { ::operator delete(ptr); } _LIBCXXABI_WEAK void -operator delete[] (void* ptr) noexcept +operator delete[] (void* ptr) noexcept { ::operator delete(ptr); } _LIBCXXABI_WEAK void -operator delete[] (void* ptr, const std::nothrow_t&) noexcept +operator delete[] (void* ptr, const std::nothrow_t&) noexcept { ::operator delete[](ptr); } _LIBCXXABI_WEAK void -operator delete[] (void* ptr, size_t) noexcept +operator delete[] (void* ptr, size_t) noexcept { ::operator delete[](ptr); } @@ -167,20 +167,20 @@ operator new(std::size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC _LIBCXXABI_WEAK void* -operator new(size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept +operator new(size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept { void* p = nullptr; #ifndef _LIBCXXABI_NO_EXCEPTIONS try { -#endif // _LIBCXXABI_NO_EXCEPTIONS +#endif // _LIBCXXABI_NO_EXCEPTIONS p = ::operator new(size, alignment); #ifndef _LIBCXXABI_NO_EXCEPTIONS } catch (...) { } -#endif // _LIBCXXABI_NO_EXCEPTIONS +#endif // _LIBCXXABI_NO_EXCEPTIONS return p; } @@ -193,61 +193,61 @@ operator new[](size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC _LIBCXXABI_WEAK void* -operator new[](size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept +operator new[](size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept { void* p = nullptr; #ifndef _LIBCXXABI_NO_EXCEPTIONS try { -#endif // _LIBCXXABI_NO_EXCEPTIONS +#endif // _LIBCXXABI_NO_EXCEPTIONS p = ::operator new[](size, alignment); #ifndef _LIBCXXABI_NO_EXCEPTIONS } catch (...) { } -#endif // _LIBCXXABI_NO_EXCEPTIONS +#endif // _LIBCXXABI_NO_EXCEPTIONS return p; } _LIBCXXABI_WEAK void -operator delete(void* ptr, std::align_val_t) noexcept +operator delete(void* ptr, std::align_val_t) noexcept { std::__libcpp_aligned_free(ptr); } _LIBCXXABI_WEAK void -operator delete(void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept +operator delete(void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept { ::operator delete(ptr, alignment); } _LIBCXXABI_WEAK void -operator delete(void* ptr, size_t, std::align_val_t alignment) noexcept +operator delete(void* ptr, size_t, std::align_val_t alignment) noexcept { ::operator delete(ptr, alignment); } _LIBCXXABI_WEAK void -operator delete[] (void* ptr, std::align_val_t alignment) noexcept +operator delete[] (void* ptr, std::align_val_t alignment) noexcept { ::operator delete(ptr, alignment); } _LIBCXXABI_WEAK void -operator delete[] (void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept +operator delete[] (void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept { ::operator delete[](ptr, alignment); } _LIBCXXABI_WEAK void -operator delete[] (void* ptr, size_t, std::align_val_t alignment) noexcept +operator delete[] (void* ptr, size_t, std::align_val_t alignment) noexcept { ::operator delete[](ptr, alignment); } diff --git a/contrib/libs/cxxsupp/libcxxabi/src/stdlib_stdexcept.cpp b/contrib/libs/cxxsupp/libcxxabi/src/stdlib_stdexcept.cpp index 8f6fb7bc2b..92f7a6e076 100644 --- a/contrib/libs/cxxsupp/libcxxabi/src/stdlib_stdexcept.cpp +++ b/contrib/libs/cxxsupp/libcxxabi/src/stdlib_stdexcept.cpp @@ -19,29 +19,29 @@ static_assert(sizeof(std::__libcpp_refstring) == sizeof(const char *), ""); namespace std // purposefully not using versioning namespace { -logic_error::~logic_error() noexcept {} +logic_error::~logic_error() noexcept {} const char* -logic_error::what() const noexcept +logic_error::what() const noexcept { return __imp_.c_str(); } -runtime_error::~runtime_error() noexcept {} +runtime_error::~runtime_error() noexcept {} const char* -runtime_error::what() const noexcept +runtime_error::what() const noexcept { return __imp_.c_str(); } -domain_error::~domain_error() noexcept {} -invalid_argument::~invalid_argument() noexcept {} -length_error::~length_error() noexcept {} -out_of_range::~out_of_range() noexcept {} +domain_error::~domain_error() noexcept {} +invalid_argument::~invalid_argument() noexcept {} +length_error::~length_error() noexcept {} +out_of_range::~out_of_range() noexcept {} -range_error::~range_error() noexcept {} -overflow_error::~overflow_error() noexcept {} -underflow_error::~underflow_error() noexcept {} +range_error::~range_error() noexcept {} +overflow_error::~overflow_error() noexcept {} +underflow_error::~underflow_error() noexcept {} } // std diff --git a/contrib/libs/cxxsupp/libcxxabi/src/stdlib_typeinfo.cpp b/contrib/libs/cxxsupp/libcxxabi/src/stdlib_typeinfo.cpp index 6df29de998..6e5499628d 100644 --- a/contrib/libs/cxxsupp/libcxxabi/src/stdlib_typeinfo.cpp +++ b/contrib/libs/cxxsupp/libcxxabi/src/stdlib_typeinfo.cpp @@ -19,32 +19,32 @@ type_info::~type_info() // bad_cast -bad_cast::bad_cast() noexcept +bad_cast::bad_cast() noexcept { } -bad_cast::~bad_cast() noexcept +bad_cast::~bad_cast() noexcept { } const char* -bad_cast::what() const noexcept +bad_cast::what() const noexcept { return "std::bad_cast"; } // bad_typeid -bad_typeid::bad_typeid() noexcept +bad_typeid::bad_typeid() noexcept { } -bad_typeid::~bad_typeid() noexcept +bad_typeid::~bad_typeid() noexcept { } const char* -bad_typeid::what() const noexcept +bad_typeid::what() const noexcept { return "std::bad_typeid"; } |