Updated clang-format to version 12
This commit is contained in:
2
Makefile
2
Makefile
@@ -62,4 +62,4 @@ init_compile_commands: debug
|
||||
|
||||
.PHONY: clang-format
|
||||
clang-format:
|
||||
docker run --rm -v $(CURDIR):/root/sources bkryza/clang-format-check:1.2
|
||||
docker run --rm -v $(CURDIR):/root/sources bkryza/clang-format-check:1.3
|
||||
|
||||
@@ -853,8 +853,9 @@ constexpr auto operator"" _catch_sr(
|
||||
INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))
|
||||
#else
|
||||
#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) \
|
||||
INTERNAL_CATCH_EXPAND_VARGS(decltype( \
|
||||
get_wrapper<INTERNAL_CATCH_REMOVE_PARENS_GEN(__VA_ARGS__)>()))
|
||||
INTERNAL_CATCH_EXPAND_VARGS( \
|
||||
decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS_GEN( \
|
||||
__VA_ARGS__)>()))
|
||||
#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) \
|
||||
INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_MAKE_TYPE_LIST2( \
|
||||
INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)))
|
||||
@@ -1277,8 +1278,8 @@ template <typename> struct true_given : std::true_type {
|
||||
};
|
||||
struct is_callable_tester {
|
||||
template <typename Fun, typename... Args>
|
||||
true_given<decltype(
|
||||
std::declval<Fun>()(std::declval<Args>()...))> static test(int);
|
||||
true_given<decltype(std::declval<Fun>()(
|
||||
std::declval<Args>()...))> static test(int);
|
||||
template <typename...> std::false_type static test(...);
|
||||
};
|
||||
|
||||
@@ -1634,8 +1635,8 @@ struct AutoReg : NonCopyable {
|
||||
}; \
|
||||
static int INTERNAL_CATCH_UNIQUE_NAME(globalRegistrar) = []() { \
|
||||
using TestInit = typename create<TestName, \
|
||||
decltype( \
|
||||
get_wrapper<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>()), \
|
||||
decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS( \
|
||||
TmplTypes)>()), \
|
||||
TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES( \
|
||||
INTERNAL_CATCH_REMOVE_PARENS(TypesList))>>::type; \
|
||||
TestInit t; \
|
||||
@@ -1851,8 +1852,8 @@ struct AutoReg : NonCopyable {
|
||||
}; \
|
||||
static int INTERNAL_CATCH_UNIQUE_NAME(globalRegistrar) = []() { \
|
||||
using TestInit = typename create<TestNameClass, \
|
||||
decltype( \
|
||||
get_wrapper<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>()), \
|
||||
decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS( \
|
||||
TmplTypes)>()), \
|
||||
TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES( \
|
||||
INTERNAL_CATCH_REMOVE_PARENS(TypesList))>>::type; \
|
||||
TestInit t; \
|
||||
@@ -2194,8 +2195,9 @@ template <typename T> std::string rawMemoryToString(const T &object)
|
||||
|
||||
template <typename T> class IsStreamInsertable {
|
||||
template <typename Stream, typename U>
|
||||
static auto test(int) -> decltype(
|
||||
std::declval<Stream &>() << std::declval<U>(), std::true_type());
|
||||
static auto test(int)
|
||||
-> decltype(std::declval<Stream &>() << std::declval<U>(),
|
||||
std::true_type());
|
||||
|
||||
template <typename, typename> static auto test(...) -> std::false_type;
|
||||
|
||||
@@ -4698,8 +4700,10 @@ struct IGeneratorTracker {
|
||||
|
||||
namespace Catch {
|
||||
#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
|
||||
template <typename Ex>
|
||||
[[noreturn]] void throw_exception(Ex const &e) { throw e; }
|
||||
template <typename Ex> [[noreturn]] void throw_exception(Ex const &e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
#else // ^^ Exceptions are enabled // Exceptions are disabled vv
|
||||
[[noreturn]] void throw_exception(std::exception const &e);
|
||||
#endif
|
||||
@@ -8153,8 +8157,7 @@ EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_cost(
|
||||
volatile auto ignored = Clock::now();
|
||||
(void)ignored;
|
||||
}
|
||||
})
|
||||
.elapsed;
|
||||
}).elapsed;
|
||||
};
|
||||
time_clock(1);
|
||||
int iters = clock_cost_estimation_iterations;
|
||||
@@ -11868,7 +11871,8 @@ void formatReconstructedExpression(std::ostream &os, std::string const &lhs,
|
||||
namespace Catch {
|
||||
#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) && \
|
||||
!defined(CATCH_CONFIG_DISABLE_EXCEPTIONS_CUSTOM_HANDLER)
|
||||
[[noreturn]] void throw_exception(std::exception const &e) {
|
||||
[[noreturn]] void throw_exception(std::exception const &e)
|
||||
{
|
||||
Catch::cerr()
|
||||
<< "Catch will terminate because it needed to throw an exception.\n"
|
||||
<< "The message was: " << e.what() << '\n';
|
||||
@@ -11881,8 +11885,10 @@ namespace Catch {
|
||||
throw_exception(std::logic_error(msg));
|
||||
}
|
||||
|
||||
[[noreturn]] void throw_domain_error(
|
||||
std::string const &msg) { throw_exception(std::domain_error(msg)); }
|
||||
[[noreturn]] void throw_domain_error(std::string const &msg)
|
||||
{
|
||||
throw_exception(std::domain_error(msg));
|
||||
}
|
||||
|
||||
[[noreturn]] void throw_runtime_error(std::string const &msg)
|
||||
{
|
||||
@@ -15056,8 +15062,8 @@ int Session::runInternal()
|
||||
// the return value to 255 prevents false negative when some multiple
|
||||
// of 256 tests has failed
|
||||
return (std::min)(MaxExitCode,
|
||||
(std::max)(
|
||||
totals.error, static_cast<int>(totals.assertions.failed)));
|
||||
(std::max)(totals.error,
|
||||
static_cast<int>(totals.assertions.failed)));
|
||||
}
|
||||
#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
|
||||
catch (std::exception &ex)
|
||||
|
||||
@@ -8,7 +8,8 @@ class A {
|
||||
}
|
||||
|
||||
namespace ns2_v0_9_0 {
|
||||
class [[deprecated]] A {};
|
||||
class [[deprecated]] A {
|
||||
};
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
Reference in New Issue
Block a user