[libcxx-commits] [libcxxabi] 953af0e - [libc++][NFC] Increase consistency for namespace closing comments
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 5 09:41:25 PDT 2024
Author: Louis Dionne
Date: 2024-09-05T12:41:20-04:00
New Revision: 953af0e7f1bcb42136be1a0ea9cdd5aa1fb74852
URL: https://github.com/llvm/llvm-project/commit/953af0e7f1bcb42136be1a0ea9cdd5aa1fb74852
DIFF: https://github.com/llvm/llvm-project/commit/953af0e7f1bcb42136be1a0ea9cdd5aa1fb74852.diff
LOG: [libc++][NFC] Increase consistency for namespace closing comments
Added:
Modified:
libcxx/include/__mdspan/extents.h
libcxx/src/filesystem/error.h
libcxx/src/filesystem/file_descriptor.h
libcxx/src/filesystem/format_string.h
libcxx/src/filesystem/operations.cpp
libcxx/src/filesystem/posix_compat.h
libcxx/src/filesystem/time_utils.h
libcxx/src/include/atomic_support.h
libcxx/src/memory_resource.cpp
libcxx/src/system_error.cpp
libcxx/test/benchmarks/ContainerBenchmarks.h
libcxx/test/benchmarks/VariantBenchmarks.h
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp
libcxx/test/support/archetypes.h
libcxx/test/support/container_test_types.h
libcxx/test/support/filesystem_test_helper.h
libcxx/test/support/make_test_thread.h
libcxx/test/support/parse_integer.h
libcxx/test/support/uses_alloc_types.h
libcxxabi/src/cxa_guard_impl.h
libcxxabi/src/cxa_personality.cpp
Removed:
################################################################################
diff --git a/libcxx/include/__mdspan/extents.h b/libcxx/include/__mdspan/extents.h
index 8fcfb4b09a2b18..3d2c2771a834b4 100644
--- a/libcxx/include/__mdspan/extents.h
+++ b/libcxx/include/__mdspan/extents.h
@@ -449,7 +449,7 @@ struct __make_dextents< _IndexType, 0, extents<_IndexType, _ExtentsPack...>> {
using type = extents<_IndexType, _ExtentsPack...>;
};
-} // end namespace __mdspan_detail
+} // namespace __mdspan_detail
// [mdspan.extents.dextents], alias template
template <class _IndexType, size_t _Rank>
diff --git a/libcxx/src/filesystem/error.h b/libcxx/src/filesystem/error.h
index 572cc73292a198..09020fbede9b94 100644
--- a/libcxx/src/filesystem/error.h
+++ b/libcxx/src/filesystem/error.h
@@ -225,7 +225,7 @@ struct ErrorHandler {
ErrorHandler& operator=(ErrorHandler const&) = delete;
};
-} // end namespace detail
+} // namespace detail
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/src/filesystem/file_descriptor.h b/libcxx/src/filesystem/file_descriptor.h
index 50178ff84e03f9..f86eb60d778087 100644
--- a/libcxx/src/filesystem/file_descriptor.h
+++ b/libcxx/src/filesystem/file_descriptor.h
@@ -284,7 +284,7 @@ inline file_status FileDescriptor::refresh_status(error_code& ec) {
return m_status;
}
-} // end namespace detail
+} // namespace detail
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/src/filesystem/format_string.h b/libcxx/src/filesystem/format_string.h
index a44def86f53e93..81c5a95ae31e5f 100644
--- a/libcxx/src/filesystem/format_string.h
+++ b/libcxx/src/filesystem/format_string.h
@@ -70,7 +70,7 @@ inline _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 1, 2) string format_string(const cha
return ret;
}
-} // end namespace detail
+} // namespace detail
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/src/filesystem/operations.cpp b/libcxx/src/filesystem/operations.cpp
index a83c1ae15a4a40..d771f200973528 100644
--- a/libcxx/src/filesystem/operations.cpp
+++ b/libcxx/src/filesystem/operations.cpp
@@ -254,7 +254,7 @@ bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_cod
#endif // copy_file_impl implementation
} // end anonymous namespace
-} // end namespace detail
+} // namespace detail
bool __copy_file(const path& from, const path& to, copy_options options, error_code* ec) {
using detail::FileDescriptor;
@@ -732,7 +732,7 @@ uintmax_t remove_all_impl(path const& p, error_code& ec) {
return count;
}
-} // end namespace
+} // namespace
uintmax_t __remove_all(const path& p, error_code* ec) {
ErrorHandler<uintmax_t> err("remove_all", ec, &p);
@@ -827,7 +827,7 @@ uintmax_t remove_all_impl(int parent_directory, const path& p, error_code& ec) {
return 0;
}
-} // end namespace
+} // namespace
uintmax_t __remove_all(const path& p, error_code* ec) {
ErrorHandler<uintmax_t> err("remove_all", ec, &p);
diff --git a/libcxx/src/filesystem/posix_compat.h b/libcxx/src/filesystem/posix_compat.h
index 760cdb65dae1d9..b41c004341af3a 100644
--- a/libcxx/src/filesystem/posix_compat.h
+++ b/libcxx/src/filesystem/posix_compat.h
@@ -490,7 +490,7 @@ using SSizeT = ::ssize_t;
#endif
-} // end namespace detail
+} // namespace detail
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/src/filesystem/time_utils.h b/libcxx/src/filesystem/time_utils.h
index e05f252868f031..13f0d6f3b726ec 100644
--- a/libcxx/src/filesystem/time_utils.h
+++ b/libcxx/src/filesystem/time_utils.h
@@ -344,7 +344,7 @@ inline file_time_type __extract_last_write_time(const path& p, const StatT& st,
#endif // !_LIBCPP_HAS_NO_FILESYSTEM
-} // end namespace detail
+} // namespace detail
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/src/include/atomic_support.h b/libcxx/src/include/atomic_support.h
index 9ce41b3229f5e4..c4bc34ffc1cd2f 100644
--- a/libcxx/src/include/atomic_support.h
+++ b/libcxx/src/include/atomic_support.h
@@ -125,7 +125,7 @@ __libcpp_atomic_compare_exchange(_ValueType* __val, _ValueType* __expected, _Val
#endif // _LIBCPP_HAS_NO_THREADS
-} // end namespace
+} // namespace
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/src/memory_resource.cpp b/libcxx/src/memory_resource.cpp
index 2117238e63487e..d2ff3509c5a31e 100644
--- a/libcxx/src/memory_resource.cpp
+++ b/libcxx/src/memory_resource.cpp
@@ -82,7 +82,7 @@ union ResourceInitHelper {
// attribute with a value that's reserved for the implementation (we're the implementation).
#include "memory_resource_init_helper.h"
-} // end namespace
+} // namespace
memory_resource* new_delete_resource() noexcept { return &res_init.resources.new_delete_res; }
diff --git a/libcxx/src/system_error.cpp b/libcxx/src/system_error.cpp
index f518b480a27820..3367bd56bd7880 100644
--- a/libcxx/src/system_error.cpp
+++ b/libcxx/src/system_error.cpp
@@ -110,7 +110,7 @@ string make_error_str(const error_code& ec) {
}
return string();
}
-} // end namespace
+} // namespace
string __do_message::message(int ev) const {
#if defined(_LIBCPP_HAS_NO_THREADS)
diff --git a/libcxx/test/benchmarks/ContainerBenchmarks.h b/libcxx/test/benchmarks/ContainerBenchmarks.h
index 744505b439985b..5404814e7599b3 100644
--- a/libcxx/test/benchmarks/ContainerBenchmarks.h
+++ b/libcxx/test/benchmarks/ContainerBenchmarks.h
@@ -223,6 +223,6 @@ static void BM_Compare_
diff erent_containers(benchmark::State& st, Container, Gen
}
}
-} // end namespace ContainerBenchmarks
+} // namespace ContainerBenchmarks
#endif // BENCHMARK_CONTAINER_BENCHMARKS_H
diff --git a/libcxx/test/benchmarks/VariantBenchmarks.h b/libcxx/test/benchmarks/VariantBenchmarks.h
index a8e9c9febd7280..ad36b59d2e879d 100644
--- a/libcxx/test/benchmarks/VariantBenchmarks.h
+++ b/libcxx/test/benchmarks/VariantBenchmarks.h
@@ -50,6 +50,6 @@ static void BM_Visit(benchmark::State& state) {
}
}
-} // end namespace VariantBenchmarks
+} // namespace VariantBenchmarks
#endif // BENCHMARK_VARIANT_BENCHMARKS_H
diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
index c1816a94fd2b6a..7024e50e81209c 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
@@ -300,7 +300,7 @@ static const bool SupportsMinRoundTrip = [] {
return min_val == file_time_type::min();
}();
-} // end namespace
+} // namespace
static bool CompareTime(TimeSpec t1, TimeSpec t2) {
if (SupportsNanosecondRoundTrip)
diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable.pass.cpp
index 925ddad28136b8..cb7614224342fa 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable.pass.cpp
@@ -61,7 +61,7 @@ struct AmbiguousSwap {};
template <class T>
void swap(T&, T&) {}
-} // end namespace MyNS2
+} // namespace MyNS2
int main(int, char**)
{
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp
index af37527522075b..ebcbcfeffc0220 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp
@@ -247,7 +247,7 @@ namespace ReturnTypeTest {
using InvokeResult = decltype(std::apply(fn, t));
static_assert(std::is_same<InvokeResult, Expect>::value, "");
}
-} // end namespace ReturnTypeTest
+} // namespace ReturnTypeTest
void test_return_type()
{
diff --git a/libcxx/test/support/archetypes.h b/libcxx/test/support/archetypes.h
index 53545f687970ec..259346e90a5105 100644
--- a/libcxx/test/support/archetypes.h
+++ b/libcxx/test/support/archetypes.h
@@ -328,7 +328,7 @@ constexpr bool operator!=(Tp const& L, Tp const& R) noexcept {
return L.value != R.value;
}
-} // end namespace ConstexprTestTypes
+} // namespace ConstexprTestTypes
//============================================================================//
@@ -351,7 +351,7 @@ constexpr bool operator!=(Tp const& L, Tp const& R) noexcept {
return L.value != R.value;
}
-} // end namespace ExplicitConstexprTestTypes
+} // namespace ExplicitConstexprTestTypes
//============================================================================//
@@ -373,7 +373,7 @@ constexpr bool operator!=(Tp const& L, Tp const& R) noexcept {
return L.value != R.value;
}
-} // end namespace TrivialTestTypes
+} // namespace TrivialTestTypes
//============================================================================//
//
@@ -395,7 +395,7 @@ constexpr bool operator!=(Tp const& L, Tp const& R) noexcept {
return L.value != R.value;
}
-} // end namespace ExplicitTrivialTestTypes
+} // namespace ExplicitTrivialTestTypes
#endif // TEST_STD_VER >= 11
diff --git a/libcxx/test/support/container_test_types.h b/libcxx/test/support/container_test_types.h
index b72bbbeaccf770..7a97e043980547 100644
--- a/libcxx/test/support/container_test_types.h
+++ b/libcxx/test/support/container_test_types.h
@@ -349,7 +349,7 @@ typedef std::allocator_traits<A2> A2T;
static_assert(std::is_same<A1T::rebind_traits<float>, A2T>::value, "");
static_assert(std::is_same<A2T::rebind_traits<int>, A1T>::value, "");
-} // end namespace test_detail
+} // namespace test_detail
//===----------------------------------------------------------------------===//
// 'CopyInsertable', 'MoveInsertable' and 'EmplaceConstructible' test types
@@ -491,6 +491,6 @@ template <class Value = CopyInsertable<1> >
using multiset =
std::multiset<Value, std::less<Value>, ContainerTestAllocator<Value, Value> >;
-} // end namespace TCT
+} // namespace TCT
#endif // SUPPORT_CONTAINER_TEST_TYPES_H
diff --git a/libcxx/test/support/filesystem_test_helper.h b/libcxx/test/support/filesystem_test_helper.h
index 29bc846fbbc832..932d14f45f8e5c 100644
--- a/libcxx/test/support/filesystem_test_helper.h
+++ b/libcxx/test/support/filesystem_test_helper.h
@@ -146,7 +146,7 @@ namespace utils {
struct ::stat tmp;
return ::stat(path.c_str(), &tmp) == 0;
}
-} // end namespace utils
+} // namespace utils
struct scoped_test_env
{
diff --git a/libcxx/test/support/make_test_thread.h b/libcxx/test/support/make_test_thread.h
index cd548fd909d71f..00190a8a69ce11 100644
--- a/libcxx/test/support/make_test_thread.h
+++ b/libcxx/test/support/make_test_thread.h
@@ -46,6 +46,6 @@ TEST_AVAILABILITY_SYNC std::jthread make_test_jthread(F&& f, Args&&... args) {
}
#endif
-} // end namespace support
+} // namespace support
#endif // TEST_SUPPORT_MAKE_TEST_THREAD_H
diff --git a/libcxx/test/support/parse_integer.h b/libcxx/test/support/parse_integer.h
index c4fa429e65d575..36f8f7b79881b8 100644
--- a/libcxx/test/support/parse_integer.h
+++ b/libcxx/test/support/parse_integer.h
@@ -62,7 +62,7 @@ struct parse_integer_impl<unsigned long long> {
return std::stoull(str);
}
};
-} // end namespace detail
+} // namespace detail
template <class T, class CharT>
T parse_integer(std::basic_string<CharT> const& str) {
diff --git a/libcxx/test/support/uses_alloc_types.h b/libcxx/test/support/uses_alloc_types.h
index 817bef1da3aef6..66746960fc87cc 100644
--- a/libcxx/test/support/uses_alloc_types.h
+++ b/libcxx/test/support/uses_alloc_types.h
@@ -120,7 +120,7 @@ using IdentityT = typename Identity<T>::type;
template <bool Value>
using EnableIfB = typename std::enable_if<Value, bool>::type;
-} // end namespace detail
+} // namespace detail
using detail::EnableIfB;
diff --git a/libcxxabi/src/cxa_guard_impl.h b/libcxxabi/src/cxa_guard_impl.h
index 320501cb859386..3e533054098e20 100644
--- a/libcxxabi/src/cxa_guard_impl.h
+++ b/libcxxabi/src/cxa_guard_impl.h
@@ -676,8 +676,8 @@ static_assert(CurrentImplementation != Implementation::Futex || PlatformSupports
using SelectedImplementation = SelectImplementation<CurrentImplementation>::type;
-} // end namespace
-} // end namespace __cxxabiv1
+} // namespace
+} // namespace __cxxabiv1
#if defined(__clang__)
# pragma clang diagnostic pop
diff --git a/libcxxabi/src/cxa_personality.cpp b/libcxxabi/src/cxa_personality.cpp
index 843a18a4cbd8a0..5f6e75c5be19ce 100644
--- a/libcxxabi/src/cxa_personality.cpp
+++ b/libcxxabi/src/cxa_personality.cpp
@@ -167,7 +167,7 @@ uintptr_t readPointerHelper(const uint8_t*& p) {
return static_cast<uintptr_t>(value);
}
-} // end namespace
+} // namespace
extern "C"
{
More information about the libcxx-commits
mailing list