Skip to content

Commit

Permalink
Merge #538
Browse files Browse the repository at this point in the history
538: Enable `modernize-concat-nested-namespaces` in clang-tidy configuration r=msimberg a=msimberg

Fixes #533.

Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>
  • Loading branch information
bors[bot] and msimberg authored Dec 9, 2022
2 parents 677ab93 + 7b33437 commit ff04f4b
Show file tree
Hide file tree
Showing 175 changed files with 1,063 additions and 1,095 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Checks: >
misc-non-copyable-objects,
misc-use-after-move,
misc-virtual-near-miss,
modernize-concat-nested-namespaces,
modernize-use-nullptr,
modernize-use-using,
# WarningsAsErrors: '*'
Expand Down
4 changes: 2 additions & 2 deletions examples/quickstart/executor_with_thread_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ namespace executor_example {

///////////////////////////////////////////////////////////////////////////////
// simple forwarding implementations of executor traits
namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {

template <typename BaseExecutor>
struct is_one_way_executor<
Expand Down Expand Up @@ -207,7 +207,7 @@ namespace pika { namespace parallel { namespace execution {
: is_bulk_two_way_executor<std::decay_t<BaseExecutor>>
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

int pika_main()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ struct additional_argument_executor
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
template <>
struct is_two_way_executor<additional_argument_executor> : std::true_type
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

///////////////////////////////////////////////////////////////////////////////
std::int32_t increment(additional_argument, std::int32_t i)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ namespace pika { namespace threads { namespace coroutines { namespace detail {
!defined(__arm64__) && !defined(__aarch64__)

#include <pika/coroutines/detail/context_linux_x86.hpp>
namespace pika { namespace threads { namespace coroutines { namespace detail {
namespace pika::threads::coroutines::detail {
template <typename CoroutineImpl>
using default_context_impl = lx::x86_linux_context_impl<CoroutineImpl>;
}}}} // namespace pika::threads::coroutines::detail
} // namespace pika::threads::coroutines::detail

#elif defined(_POSIX_VERSION) || defined(__bgq__) || defined(__powerpc__) || \
defined(__s390x__) || defined(__arm__) || defined(arm64) || \
Expand Down
4 changes: 2 additions & 2 deletions libs/pika/errors/src/exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ namespace pika {
} // namespace detail
} // namespace pika

namespace pika { namespace detail {
namespace pika::detail {
template <typename Exception>
PIKA_EXPORT std::exception_ptr
construct_lightweight_exception(Exception const& e, std::string const& func,
Expand Down Expand Up @@ -362,7 +362,7 @@ namespace pika { namespace detail {
std::out_of_range const&, std::string const&, std::string const&, long);
template PIKA_EXPORT void throw_exception(std::invalid_argument const&,
std::string const&, std::string const&, long);
}} // namespace pika::detail
} // namespace pika::detail

///////////////////////////////////////////////////////////////////////////////
namespace pika {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <utility>

namespace pika { namespace execution { namespace experimental {
namespace pika::execution::experimental {
inline constexpr struct execute_t final
: pika::functional::detail::tag_fallback<execute_t>
{
Expand All @@ -32,5 +32,5 @@ namespace pika { namespace execution { namespace experimental {
PIKA_FORWARD(F, f)));
}
} execute{};
}}} // namespace pika::execution::experimental
} // namespace pika::execution::experimental
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <utility>

namespace pika { namespace execution { namespace experimental {
namespace pika::execution::experimental {
inline constexpr struct transfer_t final
: pika::functional::detail::tag_priority<transfer_t>
{
Expand Down Expand Up @@ -68,5 +68,5 @@ namespace pika { namespace execution { namespace experimental {
PIKA_FORWARD(Scheduler, scheduler)};
}
} transfer{};
}}} // namespace pika::execution::experimental
} // namespace pika::execution::experimental
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include <utility>

namespace pika { namespace execution { namespace experimental {
namespace pika::execution::experimental {
inline constexpr struct transfer_just_t final
: pika::functional::detail::tag_fallback<transfer_just_t>
{
Expand All @@ -30,5 +30,5 @@ namespace pika { namespace execution { namespace experimental {
PIKA_FORWARD(Scheduler, scheduler));
}
} transfer_just{};
}}} // namespace pika::execution::experimental
} // namespace pika::execution::experimental
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ struct test_async_executor
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
template <>
struct is_two_way_executor<test_async_executor> : std::true_type
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

int pika_main()
{
Expand Down
40 changes: 20 additions & 20 deletions libs/pika/execution/tests/unit/executor_parameters_dispatching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ struct test_executor_get_chunk_size : pika::execution::parallel_executor
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
template <>
struct is_two_way_executor<test_executor_get_chunk_size> : std::true_type
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

struct test_chunk_size
{
Expand All @@ -59,14 +59,14 @@ struct test_chunk_size
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
/// \cond NOINTERNAL
template <>
struct is_executor_parameters<test_chunk_size> : std::true_type
{
};
/// \endcond
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

///////////////////////////////////////////////////////////////////////////////
void test_get_chunk_size()
Expand Down Expand Up @@ -116,13 +116,13 @@ struct test_executor_maximal_number_of_chunks
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
template <>
struct is_two_way_executor<test_executor_maximal_number_of_chunks>
: std::true_type
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

struct test_number_of_chunks
{
Expand All @@ -135,12 +135,12 @@ struct test_number_of_chunks
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
template <>
struct is_executor_parameters<test_number_of_chunks> : std::true_type
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

///////////////////////////////////////////////////////////////////////////////
void test_maximal_number_of_chunks()
Expand Down Expand Up @@ -187,13 +187,13 @@ struct test_executor_reset_thread_distribution
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
template <>
struct is_two_way_executor<test_executor_reset_thread_distribution>
: std::true_type
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

struct test_thread_distribution
{
Expand All @@ -204,12 +204,12 @@ struct test_thread_distribution
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
template <>
struct is_executor_parameters<test_thread_distribution> : std::true_type
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

///////////////////////////////////////////////////////////////////////////////
void test_reset_thread_distribution()
Expand Down Expand Up @@ -256,13 +256,13 @@ struct test_executor_processing_units_count : pika::execution::parallel_executor
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
template <>
struct is_two_way_executor<test_executor_processing_units_count>
: std::true_type
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

struct test_processing_units
{
Expand All @@ -274,12 +274,12 @@ struct test_processing_units
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
template <>
struct is_executor_parameters<test_processing_units> : std::true_type
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

///////////////////////////////////////////////////////////////////////////////
void test_processing_units_count()
Expand Down Expand Up @@ -336,12 +336,12 @@ struct test_executor_begin_end : pika::execution::parallel_executor
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
template <>
struct is_two_way_executor<test_executor_begin_end> : std::true_type
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

struct test_begin_end
{
Expand All @@ -364,12 +364,12 @@ struct test_begin_end
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
template <>
struct is_executor_parameters<test_begin_end> : std::true_type
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

///////////////////////////////////////////////////////////////////////////////
void test_mark_begin_execution()
Expand Down
20 changes: 10 additions & 10 deletions libs/pika/execution/tests/unit/minimal_async_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ struct test_async_executor1
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
template <>
struct is_two_way_executor<test_async_executor1> : std::true_type
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

struct test_async_executor2 : test_async_executor1
{
Expand All @@ -182,12 +182,12 @@ struct test_async_executor2 : test_async_executor1
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
template <>
struct is_two_way_executor<test_async_executor2> : std::true_type
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

struct test_async_executor3 : test_async_executor1
{
Expand All @@ -206,12 +206,12 @@ struct test_async_executor3 : test_async_executor1
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
template <>
struct is_two_way_executor<test_async_executor3> : std::true_type
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

struct test_async_executor4 : test_async_executor1
{
Expand All @@ -231,7 +231,7 @@ struct test_async_executor4 : test_async_executor1
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
template <>
struct is_two_way_executor<test_async_executor4> : std::true_type
{
Expand All @@ -241,7 +241,7 @@ namespace pika { namespace parallel { namespace execution {
struct is_bulk_two_way_executor<test_async_executor4> : std::true_type
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

struct test_async_executor5 : test_async_executor1
{
Expand All @@ -255,12 +255,12 @@ struct test_async_executor5 : test_async_executor1
}
};

namespace pika { namespace parallel { namespace execution {
namespace pika::parallel::execution {
template <>
struct is_two_way_executor<test_async_executor5> : std::true_type
{
};
}}} // namespace pika::parallel::execution
} // namespace pika::parallel::execution

template <typename Executor, typename B1, typename B2, typename B3, typename B4,
typename B5>
Expand Down
Loading

0 comments on commit ff04f4b

Please sign in to comment.