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