[libcxx-commits] [libcxx] d2b0df3 - [libc++][NFC] Update namespace comments in include/

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 2 12:07:50 PST 2021


Author: Nikolas Klauser
Date: 2021-12-02T21:06:59+01:00
New Revision: d2b0df35afb7184f5a68f67d6ed0c6230688df7f

URL: https://github.com/llvm/llvm-project/commit/d2b0df35afb7184f5a68f67d6ed0c6230688df7f
DIFF: https://github.com/llvm/llvm-project/commit/d2b0df35afb7184f5a68f67d6ed0c6230688df7f.diff

LOG: [libc++][NFC] Update namespace comments in include/

update the namspace comments in include/

Reviewed By: ldionne, #libc

Spies: smeenai, libcxx-commits

Differential Revision: https://reviews.llvm.org/D114947

Added: 
    

Modified: 
    libcxx/include/__functional/bind.h
    libcxx/include/__functional/function.h
    libcxx/include/__nullptr
    libcxx/include/__threading_support
    libcxx/include/__utility/rel_ops.h
    libcxx/include/charconv
    libcxx/include/chrono
    libcxx/include/complex
    libcxx/include/exception
    libcxx/include/ext/__hash
    libcxx/include/ext/hash_map
    libcxx/include/ext/hash_set
    libcxx/include/initializer_list
    libcxx/include/new
    libcxx/include/optional
    libcxx/include/regex
    libcxx/include/stdexcept
    libcxx/include/string
    libcxx/include/string_view
    libcxx/include/thread
    libcxx/include/tuple
    libcxx/include/type_traits
    libcxx/include/typeinfo

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__functional/bind.h b/libcxx/include/__functional/bind.h
index 0b74d91b7746c..0eb95c824664e 100644
--- a/libcxx/include/__functional/bind.h
+++ b/libcxx/include/__functional/bind.h
@@ -70,7 +70,7 @@ _LIBCPP_FUNC_VIS extern const __ph<10> _10;
 /* inline */ constexpr __ph<10> _10{};
 #endif // defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY)
 
-}  // placeholders
+} // namespace placeholders
 
 template<int _Np>
 struct __is_placeholder<placeholders::__ph<_Np> >

diff  --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h
index 83fd7c12de2fe..0a17b0bf97f50 100644
--- a/libcxx/include/__functional/function.h
+++ b/libcxx/include/__functional/function.h
@@ -946,7 +946,7 @@ class __func<_Rp1(^)(_ArgTypes1...), _Alloc, _Rp(_ArgTypes...)>
 
 #endif // _LIBCPP_HAS_EXTENSION_BLOCKS && !_LIBCPP_HAS_OBJC_ARC
 
-}  // __function
+} // namespace __function
 
 template<class _Rp, class ..._ArgTypes>
 class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)>

diff  --git a/libcxx/include/__nullptr b/libcxx/include/__nullptr
index d02be215ef1da..c6645cd0150e8 100644
--- a/libcxx/include/__nullptr
+++ b/libcxx/include/__nullptr
@@ -54,7 +54,7 @@ _LIBCPP_END_NAMESPACE_STD
 namespace std
 {
     typedef decltype(nullptr) nullptr_t;
-}
+} // namespace std
 
 #endif // _LIBCPP_HAS_NO_NULLPTR
 

diff  --git a/libcxx/include/__threading_support b/libcxx/include/__threading_support
index 0094fca2fb389..1ff8861bd23db 100644
--- a/libcxx/include/__threading_support
+++ b/libcxx/include/__threading_support
@@ -296,7 +296,7 @@ inline __libcpp_timespec_t __convert_to_timespec(const chrono::nanoseconds& __ns
   return __ts;
 }
 
-}
+} // namespace __thread_detail
 
 #if defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
 
@@ -643,7 +643,7 @@ namespace this_thread
 
 _LIBCPP_INLINE_VISIBILITY __thread_id get_id() _NOEXCEPT;
 
-}  // this_thread
+} // namespace this_thread
 
 template<> struct hash<__thread_id>;
 
@@ -713,7 +713,7 @@ get_id() _NOEXCEPT
     return __libcpp_thread_get_current_id();
 }
 
-}  // this_thread
+} // namespace this_thread
 
 #endif // !_LIBCPP_HAS_NO_THREADS
 

diff  --git a/libcxx/include/__utility/rel_ops.h b/libcxx/include/__utility/rel_ops.h
index c94b8fddafee1..d59e96d72dc17 100644
--- a/libcxx/include/__utility/rel_ops.h
+++ b/libcxx/include/__utility/rel_ops.h
@@ -55,7 +55,7 @@ operator>=(const _Tp& __x, const _Tp& __y)
     return !(__x < __y);
 }
 
-}  // rel_ops
+} // namespace rel_ops
 
 _LIBCPP_END_NAMESPACE_STD
 

diff  --git a/libcxx/include/charconv b/libcxx/include/charconv
index 3c969dc79ab06..ff7b75c8d7042 100644
--- a/libcxx/include/charconv
+++ b/libcxx/include/charconv
@@ -105,7 +105,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 namespace __itoa {
 _LIBCPP_AVAILABILITY_TO_CHARS _LIBCPP_FUNC_VIS char* __u64toa(uint64_t __value, char* __buffer) _NOEXCEPT;
 _LIBCPP_AVAILABILITY_TO_CHARS _LIBCPP_FUNC_VIS char* __u32toa(uint32_t __value, char* __buffer) _NOEXCEPT;
-}
+} // namespace __itoa
 
 #ifndef _LIBCPP_CXX03_LANG
 

diff  --git a/libcxx/include/chrono b/libcxx/include/chrono
index d29734f6c358c..90c9b0829a1f5 100644
--- a/libcxx/include/chrono
+++ b/libcxx/include/chrono
@@ -738,7 +738,7 @@ struct __is_duration<volatile duration<_Rep, _Period> > : true_type  {};
 template <class _Rep, class _Period>
 struct __is_duration<const volatile duration<_Rep, _Period> > : true_type  {};
 
-} // chrono
+} // namespace chrono
 
 template <class _Rep1, class _Period1, class _Rep2, class _Period2>
 struct _LIBCPP_TEMPLATE_VIS common_type<chrono::duration<_Rep1, _Period1>,
@@ -1265,7 +1265,7 @@ public:
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR time_point max() _NOEXCEPT {return time_point(duration::max());}
 };
 
-} // chrono
+} // namespace chrono
 
 template <class _Clock, class _Duration1, class _Duration2>
 struct _LIBCPP_TEMPLATE_VIS common_type<chrono::time_point<_Clock, _Duration1>,
@@ -2701,7 +2701,7 @@ constexpr hours make24(const hours& __h, bool __is_pm) noexcept
 }
 
 #endif // _LIBCPP_STD_VER > 17
-} // chrono
+} // namespace chrono
 
 #if _LIBCPP_STD_VER > 11
 // Suffixes for duration literals [time.duration.literals]
@@ -2786,11 +2786,12 @@ inline namespace literals
         return chrono::year(static_cast<int>(__y));
     }
 #endif
-}}
+} // namespace chrono_literals
+} // namespace literals
 
 namespace chrono { // hoist the literals into namespace std::chrono
    using namespace literals::chrono_literals;
-}
+} // namespace chrono
 
 #endif
 

diff  --git a/libcxx/include/complex b/libcxx/include/complex
index 6b74435c61018..2dc58c0104953 100644
--- a/libcxx/include/complex
+++ b/libcxx/include/complex
@@ -1485,8 +1485,8 @@ inline namespace literals
     {
         return { 0.0f, static_cast<float>(__im) };
     }
-  }
-}
+  } // namespace complex_literals
+} // namespace literals
 #endif
 
 _LIBCPP_END_NAMESPACE_STD

diff  --git a/libcxx/include/exception b/libcxx/include/exception
index 5f5486149ac08..886daac4439ac 100644
--- a/libcxx/include/exception
+++ b/libcxx/include/exception
@@ -328,6 +328,6 @@ rethrow_if_nested(const _Ep&,
 {
 }
 
-}  // std
+} // namespace std
 
 #endif // _LIBCPP_EXCEPTION

diff  --git a/libcxx/include/ext/__hash b/libcxx/include/ext/__hash
index 268577f3c922a..2f998ee40a930 100644
--- a/libcxx/include/ext/__hash
+++ b/libcxx/include/ext/__hash
@@ -129,6 +129,6 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned long>
         return __c;
     }
 };
-}
+} // namespace __gnu_cxx
 
 #endif // _LIBCPP_EXT_HASH

diff  --git a/libcxx/include/ext/hash_map b/libcxx/include/ext/hash_map
index 6c757e2fba3e7..d6ea26c2cf86e 100644
--- a/libcxx/include/ext/hash_map
+++ b/libcxx/include/ext/hash_map
@@ -979,6 +979,6 @@ operator!=(const hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
     return !(__x == __y);
 }
 
-} // __gnu_cxx
+} // namespace __gnu_cxx
 
 #endif // _LIBCPP_HASH_MAP

diff  --git a/libcxx/include/ext/hash_set b/libcxx/include/ext/hash_set
index b61f5f1da4486..80829d58c98d8 100644
--- a/libcxx/include/ext/hash_set
+++ b/libcxx/include/ext/hash_set
@@ -654,6 +654,6 @@ operator!=(const hash_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
     return !(__x == __y);
 }
 
-} // __gnu_cxx
+} // namespace __gnu_cxx
 
 #endif // _LIBCPP_HASH_SET

diff  --git a/libcxx/include/initializer_list b/libcxx/include/initializer_list
index d867ee6af0178..fefaf8cf8b6f9 100644
--- a/libcxx/include/initializer_list
+++ b/libcxx/include/initializer_list
@@ -112,6 +112,6 @@ end(initializer_list<_Ep> __il) _NOEXCEPT
 
 #endif // !defined(_LIBCPP_CXX03_LANG)
 
-}  // std
+} // namespace std
 
 #endif // _LIBCPP_INITIALIZER_LIST

diff  --git a/libcxx/include/new b/libcxx/include/new
index 593af9d5c6195..be0d972f42da5 100644
--- a/libcxx/include/new
+++ b/libcxx/include/new
@@ -177,7 +177,7 @@ struct destroying_delete_t {
 inline constexpr destroying_delete_t destroying_delete{};
 #endif // _LIBCPP_STD_VER > 17
 
-}  // std
+} // namespace std
 
 #if defined(_LIBCPP_CXX03_LANG)
 #define _THROW_BAD_ALLOC throw(std::bad_alloc)

diff  --git a/libcxx/include/optional b/libcxx/include/optional
index 837f867328fb5..1faa78ef7389e 100644
--- a/libcxx/include/optional
+++ b/libcxx/include/optional
@@ -175,7 +175,7 @@ public:
     virtual const char* what() const _NOEXCEPT;
 };
 
-}  // std
+} // namespace std
 
 #if _LIBCPP_STD_VER > 14
 

diff  --git a/libcxx/include/regex b/libcxx/include/regex
index 815ff7d3862d5..8203c81659c87 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -978,7 +978,7 @@ enum error_type
     __re_err_parse
 };
 
-}  // regex_constants
+} // namespace regex_constants
 
 class _LIBCPP_EXCEPTION_ABI regex_error
     : public runtime_error

diff  --git a/libcxx/include/stdexcept b/libcxx/include/stdexcept
index ddbc6303b6246..c1dc05669bb9f 100644
--- a/libcxx/include/stdexcept
+++ b/libcxx/include/stdexcept
@@ -209,7 +209,7 @@ public:
 #endif
 };
 
-}  // std
+} // namespace std
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

diff  --git a/libcxx/include/string b/libcxx/include/string
index 313a7b5c23763..ed2fb7e8538d8 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -4571,8 +4571,8 @@ inline namespace literals
     {
         return basic_string<char32_t> (__str, __len);
     }
-  }
-}
+  } // namespace string_literals
+} // namespace literals
 #endif
 
 _LIBCPP_END_NAMESPACE_STD

diff  --git a/libcxx/include/string_view b/libcxx/include/string_view
index a5f85e88b5026..c40782d1ca8b0 100644
--- a/libcxx/include/string_view
+++ b/libcxx/include/string_view
@@ -947,8 +947,8 @@ inline namespace literals
     {
         return basic_string_view<char32_t> (__str, __len);
     }
-  }
-}
+  } // namespace string_view_literals
+} // namespace literals
 #endif
 _LIBCPP_END_NAMESPACE_STD
 

diff  --git a/libcxx/include/thread b/libcxx/include/thread
index a51a11c0d3c83..bf751c87aa3ba 100644
--- a/libcxx/include/thread
+++ b/libcxx/include/thread
@@ -403,7 +403,7 @@ sleep_until(const chrono::time_point<chrono::steady_clock, _Duration>& __t)
 inline _LIBCPP_INLINE_VISIBILITY
 void yield() _NOEXCEPT {__libcpp_thread_yield();}
 
-}  // this_thread
+} // namespace this_thread
 
 _LIBCPP_END_NAMESPACE_STD
 

diff  --git a/libcxx/include/tuple b/libcxx/include/tuple
index 2e3d19627fab9..8ee5c2eef51df 100644
--- a/libcxx/include/tuple
+++ b/libcxx/include/tuple
@@ -1200,7 +1200,7 @@ struct __find_exactly_one_checked<_T1> {
     static_assert(!is_same<_T1, _T1>::value, "type not in empty type list");
 };
 
-} // namespace __find_detail;
+} // namespace __find_detail
 
 template <typename _T1, typename... _Args>
 struct __find_exactly_one_t
@@ -1257,7 +1257,7 @@ struct __ignore_t
 
 namespace {
   constexpr __ignore_t<unsigned char> ignore = __ignore_t<unsigned char>();
-}
+} // namespace
 
 template <class... _Tp>
 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11

diff  --git a/libcxx/include/type_traits b/libcxx/include/type_traits
index bfb6fcb05134e..4c8f198c37a27 100644
--- a/libcxx/include/type_traits
+++ b/libcxx/include/type_traits
@@ -3953,7 +3953,7 @@ struct __nothrow_swappable_with {
 template <class _Tp, class _Up>
 struct __nothrow_swappable_with<_Tp, _Up, false> : false_type {};
 
-}  // __detail
+} // namespace __detail
 
 template <class _Tp>
 struct __is_swappable

diff  --git a/libcxx/include/typeinfo b/libcxx/include/typeinfo
index d0f9db36a6274..af82175487706 100644
--- a/libcxx/include/typeinfo
+++ b/libcxx/include/typeinfo
@@ -361,7 +361,7 @@ class _LIBCPP_EXCEPTION_ABI bad_typeid
   virtual const char* what() const _NOEXCEPT;
 };
 
-}  // std
+} // namespace std
 
 #endif // defined(_LIBCPP_ABI_VCRUNTIME)
 


        


More information about the libcxx-commits mailing list