[libcxx-commits] [libcxx] bd7da23 - [libc++] Formats the forwarded ios headers.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 3 09:35:01 PDT 2023


Author: Mark de Wever
Date: 2023-05-03T18:34:42+02:00
New Revision: bd7da23c66947b601cef4f1a33d3bbc1a5365e36

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

LOG: [libc++] Formats the forwarded ios headers.

Reviewed By: #libc, ldionne

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

Added: 
    

Modified: 
    libcxx/include/__fwd/fstream.h
    libcxx/include/__fwd/ios.h
    libcxx/include/__fwd/istream.h
    libcxx/include/__fwd/ostream.h
    libcxx/include/__fwd/sstream.h
    libcxx/include/__fwd/streambuf.h
    libcxx/utils/data/ignore_format.txt

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__fwd/fstream.h b/libcxx/include/__fwd/fstream.h
index 62fd57374462d..0eed60a42c2b4 100644
--- a/libcxx/include/__fwd/fstream.h
+++ b/libcxx/include/__fwd/fstream.h
@@ -19,34 +19,34 @@
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_filebuf;
+class _LIBCPP_TEMPLATE_VIS basic_filebuf;
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_ifstream;
+class _LIBCPP_TEMPLATE_VIS basic_ifstream;
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_ofstream;
+class _LIBCPP_TEMPLATE_VIS basic_ofstream;
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_fstream;
+class _LIBCPP_TEMPLATE_VIS basic_fstream;
 
-typedef basic_filebuf<char>          filebuf;
-typedef basic_ifstream<char>         ifstream;
-typedef basic_ofstream<char>         ofstream;
-typedef basic_fstream<char>          fstream;
+typedef basic_filebuf<char> filebuf;
+typedef basic_ifstream<char> ifstream;
+typedef basic_ofstream<char> ofstream;
+typedef basic_fstream<char> fstream;
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-typedef basic_filebuf<wchar_t>       wfilebuf;
-typedef basic_ifstream<wchar_t>      wifstream;
-typedef basic_ofstream<wchar_t>      wofstream;
-typedef basic_fstream<wchar_t>       wfstream;
+typedef basic_filebuf<wchar_t> wfilebuf;
+typedef basic_ifstream<wchar_t> wifstream;
+typedef basic_ofstream<wchar_t> wofstream;
+typedef basic_fstream<wchar_t> wfstream;
 #endif
 
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(filebuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wfilebuf)) basic_filebuf;
+class _LIBCPP_PREFERRED_NAME(filebuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wfilebuf)) basic_filebuf;
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(ifstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wifstream)) basic_ifstream;
+class _LIBCPP_PREFERRED_NAME(ifstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wifstream)) basic_ifstream;
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(ofstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wofstream)) basic_ofstream;
+class _LIBCPP_PREFERRED_NAME(ofstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wofstream)) basic_ofstream;
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(fstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wfstream)) basic_fstream;
+class _LIBCPP_PREFERRED_NAME(fstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wfstream)) basic_fstream;
 
 _LIBCPP_END_NAMESPACE_STD
 

diff  --git a/libcxx/include/__fwd/ios.h b/libcxx/include/__fwd/ios.h
index 214dcf340da0c..e2512471e9729 100644
--- a/libcxx/include/__fwd/ios.h
+++ b/libcxx/include/__fwd/ios.h
@@ -19,21 +19,21 @@
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_ios;
+class _LIBCPP_TEMPLATE_VIS basic_ios;
 
-typedef basic_ios<char>              ios;
+typedef basic_ios<char> ios;
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-typedef basic_ios<wchar_t>           wios;
+typedef basic_ios<wchar_t> wios;
 #endif
 
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(ios) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wios)) basic_ios;
+class _LIBCPP_PREFERRED_NAME(ios) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wios)) basic_ios;
 
 #if defined(_NEWLIB_VERSION)
 // On newlib, off_t is 'long int'
-typedef long int streamoff;         // for char_traits in <string>
+typedef long int streamoff; // for char_traits in <string>
 #else
-typedef long long streamoff;        // for char_traits in <string>
+typedef long long streamoff; // for char_traits in <string>
 #endif
 
 _LIBCPP_END_NAMESPACE_STD

diff  --git a/libcxx/include/__fwd/istream.h b/libcxx/include/__fwd/istream.h
index c0a3cdeeb14de..5172da095ece1 100644
--- a/libcxx/include/__fwd/istream.h
+++ b/libcxx/include/__fwd/istream.h
@@ -19,24 +19,24 @@
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_istream;
+class _LIBCPP_TEMPLATE_VIS basic_istream;
 
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_iostream;
+class _LIBCPP_TEMPLATE_VIS basic_iostream;
 
-typedef basic_istream<char>          istream;
-typedef basic_iostream<char>         iostream;
+typedef basic_istream<char> istream;
+typedef basic_iostream<char> iostream;
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-typedef basic_istream<wchar_t>       wistream;
-typedef basic_iostream<wchar_t>      wiostream;
+typedef basic_istream<wchar_t> wistream;
+typedef basic_iostream<wchar_t> wiostream;
 #endif
 
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(istream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wistream)) basic_istream;
+class _LIBCPP_PREFERRED_NAME(istream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wistream)) basic_istream;
 
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(iostream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wiostream)) basic_iostream;
+class _LIBCPP_PREFERRED_NAME(iostream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wiostream)) basic_iostream;
 
 _LIBCPP_END_NAMESPACE_STD
 

diff  --git a/libcxx/include/__fwd/ostream.h b/libcxx/include/__fwd/ostream.h
index 249d865a0e3e6..5a6a01f3b8341 100644
--- a/libcxx/include/__fwd/ostream.h
+++ b/libcxx/include/__fwd/ostream.h
@@ -19,16 +19,16 @@
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_ostream;
+class _LIBCPP_TEMPLATE_VIS basic_ostream;
 
-typedef basic_ostream<char>          ostream;
+typedef basic_ostream<char> ostream;
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-typedef basic_ostream<wchar_t>       wostream;
+typedef basic_ostream<wchar_t> wostream;
 #endif
 
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(ostream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wostream)) basic_ostream;
+class _LIBCPP_PREFERRED_NAME(ostream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wostream)) basic_ostream;
 
 _LIBCPP_END_NAMESPACE_STD
 

diff  --git a/libcxx/include/__fwd/sstream.h b/libcxx/include/__fwd/sstream.h
index 836c004215cae..83e82bf8a272a 100644
--- a/libcxx/include/__fwd/sstream.h
+++ b/libcxx/include/__fwd/sstream.h
@@ -18,40 +18,39 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-template <class _CharT, class _Traits = char_traits<_CharT>,
-          class _Allocator = allocator<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_stringbuf;
-
-template <class _CharT, class _Traits = char_traits<_CharT>,
-          class _Allocator = allocator<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_istringstream;
-template <class _CharT, class _Traits = char_traits<_CharT>,
-          class _Allocator = allocator<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_ostringstream;
-template <class _CharT, class _Traits = char_traits<_CharT>,
-          class _Allocator = allocator<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_stringstream;
-
-typedef basic_stringbuf<char>        stringbuf;
-typedef basic_istringstream<char>    istringstream;
-typedef basic_ostringstream<char>    ostringstream;
-typedef basic_stringstream<char>     stringstream;
+template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
+class _LIBCPP_TEMPLATE_VIS basic_stringbuf;
+
+template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
+class _LIBCPP_TEMPLATE_VIS basic_istringstream;
+template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
+class _LIBCPP_TEMPLATE_VIS basic_ostringstream;
+template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
+class _LIBCPP_TEMPLATE_VIS basic_stringstream;
+
+typedef basic_stringbuf<char> stringbuf;
+typedef basic_istringstream<char> istringstream;
+typedef basic_ostringstream<char> ostringstream;
+typedef basic_stringstream<char> stringstream;
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-typedef basic_stringbuf<wchar_t>     wstringbuf;
+typedef basic_stringbuf<wchar_t> wstringbuf;
 typedef basic_istringstream<wchar_t> wistringstream;
 typedef basic_ostringstream<wchar_t> wostringstream;
-typedef basic_stringstream<wchar_t>  wstringstream;
+typedef basic_stringstream<wchar_t> wstringstream;
 #endif
 
 template <class _CharT, class _Traits, class _Allocator>
-    class _LIBCPP_PREFERRED_NAME(stringbuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstringbuf)) basic_stringbuf;
+class _LIBCPP_PREFERRED_NAME(stringbuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstringbuf)) basic_stringbuf;
 template <class _CharT, class _Traits, class _Allocator>
-    class _LIBCPP_PREFERRED_NAME(istringstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wistringstream)) basic_istringstream;
+class _LIBCPP_PREFERRED_NAME(istringstream)
+    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wistringstream)) basic_istringstream;
 template <class _CharT, class _Traits, class _Allocator>
-    class _LIBCPP_PREFERRED_NAME(ostringstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wostringstream)) basic_ostringstream;
+class _LIBCPP_PREFERRED_NAME(ostringstream)
+    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wostringstream)) basic_ostringstream;
 template <class _CharT, class _Traits, class _Allocator>
-    class _LIBCPP_PREFERRED_NAME(stringstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstringstream)) basic_stringstream;
+class _LIBCPP_PREFERRED_NAME(stringstream)
+    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstringstream)) basic_stringstream;
 
 _LIBCPP_END_NAMESPACE_STD
 

diff  --git a/libcxx/include/__fwd/streambuf.h b/libcxx/include/__fwd/streambuf.h
index f3390b32cace7..f1ee9115ed247 100644
--- a/libcxx/include/__fwd/streambuf.h
+++ b/libcxx/include/__fwd/streambuf.h
@@ -19,16 +19,16 @@
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_streambuf;
+class _LIBCPP_TEMPLATE_VIS basic_streambuf;
 
-typedef basic_streambuf<char>        streambuf;
+typedef basic_streambuf<char> streambuf;
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-typedef basic_streambuf<wchar_t>     wstreambuf;
+typedef basic_streambuf<wchar_t> wstreambuf;
 #endif
 
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(streambuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstreambuf)) basic_streambuf;
+class _LIBCPP_PREFERRED_NAME(streambuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstreambuf)) basic_streambuf;
 
 _LIBCPP_END_NAMESPACE_STD
 

diff  --git a/libcxx/utils/data/ignore_format.txt b/libcxx/utils/data/ignore_format.txt
index 152968aaa60c2..cfc617c1fb3fd 100644
--- a/libcxx/utils/data/ignore_format.txt
+++ b/libcxx/utils/data/ignore_format.txt
@@ -398,14 +398,8 @@ libcxx/include/__functional/unary_negate.h
 libcxx/include/__functional/unwrap_ref.h
 libcxx/include/__functional/weak_result_type.h
 libcxx/include/future
-libcxx/include/__fwd/fstream.h
 libcxx/include/__fwd/get.h
-libcxx/include/__fwd/ios.h
-libcxx/include/__fwd/istream.h
-libcxx/include/__fwd/ostream.h
 libcxx/include/__fwd/span.h
-libcxx/include/__fwd/sstream.h
-libcxx/include/__fwd/streambuf.h
 libcxx/include/__fwd/string_view.h
 libcxx/include/__fwd/subrange.h
 libcxx/include/__hash_table


        


More information about the libcxx-commits mailing list