Skip to content

Commit

Permalink
[libc++][NFC] Increase consistency for namespace closing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ldionne committed Sep 5, 2024
1 parent 2ed510d commit 953af0e
Show file tree
Hide file tree
Showing 23 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion libcxx/include/__mdspan/extents.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion libcxx/src/filesystem/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ struct ErrorHandler {
ErrorHandler& operator=(ErrorHandler const&) = delete;
};

} // end namespace detail
} // namespace detail

_LIBCPP_END_NAMESPACE_FILESYSTEM

Expand Down
2 changes: 1 addition & 1 deletion libcxx/src/filesystem/file_descriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion libcxx/src/filesystem/format_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions libcxx/src/filesystem/operations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion libcxx/src/filesystem/posix_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ using SSizeT = ::ssize_t;

#endif

} // end namespace detail
} // namespace detail

_LIBCPP_END_NAMESPACE_FILESYSTEM

Expand Down
2 changes: 1 addition & 1 deletion libcxx/src/filesystem/time_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion libcxx/src/include/atomic_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion libcxx/src/memory_resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand Down
2 changes: 1 addition & 1 deletion libcxx/src/system_error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/benchmarks/ContainerBenchmarks.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,6 @@ static void BM_Compare_different_containers(benchmark::State& st, Container, Gen
}
}

} // end namespace ContainerBenchmarks
} // namespace ContainerBenchmarks

#endif // BENCHMARK_CONTAINER_BENCHMARKS_H
2 changes: 1 addition & 1 deletion libcxx/test/benchmarks/VariantBenchmarks.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ static void BM_Visit(benchmark::State& state) {
}
}

} // end namespace VariantBenchmarks
} // namespace VariantBenchmarks

#endif // BENCHMARK_VARIANT_BENCHMARKS_H
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct AmbiguousSwap {};
template <class T>
void swap(T&, T&) {}

} // end namespace MyNS2
} // namespace MyNS2

int main(int, char**)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
8 changes: 4 additions & 4 deletions libcxx/test/support/archetypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ constexpr bool operator!=(Tp const& L, Tp const& R) noexcept {
return L.value != R.value;
}

} // end namespace ConstexprTestTypes
} // namespace ConstexprTestTypes


//============================================================================//
Expand All @@ -351,7 +351,7 @@ constexpr bool operator!=(Tp const& L, Tp const& R) noexcept {
return L.value != R.value;
}

} // end namespace ExplicitConstexprTestTypes
} // namespace ExplicitConstexprTestTypes


//============================================================================//
Expand All @@ -373,7 +373,7 @@ constexpr bool operator!=(Tp const& L, Tp const& R) noexcept {
return L.value != R.value;
}

} // end namespace TrivialTestTypes
} // namespace TrivialTestTypes

//============================================================================//
//
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions libcxx/test/support/container_test_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion libcxx/test/support/filesystem_test_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/support/make_test_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion libcxx/test/support/parse_integer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/support/uses_alloc_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions libcxxabi/src/cxa_guard_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libcxxabi/src/cxa_personality.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ uintptr_t readPointerHelper(const uint8_t*& p) {
return static_cast<uintptr_t>(value);
}

} // end namespace
} // namespace

extern "C"
{
Expand Down

0 comments on commit 953af0e

Please sign in to comment.