clang-cl: fix a bunch of warnings

This commit is contained in:
Megamouse
2025-07-01 20:54:35 +02:00
parent a5c4951914
commit 2bb2c748bd
8 changed files with 43 additions and 19 deletions

View File

@@ -393,7 +393,7 @@ namespace fmt
raw_throw_exception(src_loc, reinterpret_cast<const char*>(fmt), type_info_v<Args...>, fmt_args_t<Args...>{fmt_unveil<Args>::get(args)...});
}
#ifndef _MSC_VER
#if !defined(_MSC_VER) || defined(__clang__)
[[noreturn]] ~throw_exception();
#endif
};

View File

@@ -374,13 +374,23 @@ private:
static const u64 process_affinity_mask;
};
#if defined(__has_cpp_attribute)
#if __has_cpp_attribute(no_unique_address)
#define NO_UNIQUE_ADDRESS [[no_unique_address]]
#else
#define NO_UNIQUE_ADDRESS
#endif
#else
#define NO_UNIQUE_ADDRESS
#endif
// Used internally
template <bool Discard, typename Ctx, typename... Args>
class thread_future_t : public thread_future, result_storage<Ctx, std::conditional_t<Discard, int, void>, Args...>
{
[[no_unique_address]] decltype(std::make_tuple(std::forward<Args>(std::declval<Args>())...)) m_args;
NO_UNIQUE_ADDRESS decltype(std::make_tuple(std::forward<Args>(std::declval<Args>())...)) m_args;
[[no_unique_address]] Ctx m_func;
NO_UNIQUE_ADDRESS Ctx m_func;
using future = thread_future_t;