Skip to content

Commit 608c85c

Browse files
authored
[libc++] Documentation polish (#132962)
- Some lists re-ordered alphabetically - Spelling, grammar, language, etc
1 parent fc3b67a commit 608c85c

File tree

5 files changed

+87
-86
lines changed

5 files changed

+87
-86
lines changed

libcxx/docs/CodingGuidelines.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ and then check for ``#if _LIBCPP_SOMETHING_ENABLED`` instead of
7979
8080
and then checking for ``#ifdef _LIBCPP_SOMETHING_ENABLED``.
8181

82-
This makes it significantly easier to catch missing includes, since Clang and GCC will warn when using and undefined
83-
marco inside an ``#if`` statement when using ``-Wundef``. Some macros in libc++ don't use this style yet, so this only
84-
applies when introducing a new macro.
82+
This makes it significantly easier to catch missing includes: Clang and GCC with ``-Wundef`` enabled will warn
83+
when using an undefined macro inside an ``#if`` statement. Some macros in libc++ don't use this style yet,
84+
so this guideline only applies when introducing a new macro.
8585

8686
This is partially enforced by the clang-tidy check ``libcpp-internal-ftms``.
8787

@@ -107,9 +107,9 @@ This is enforced by the clang-tidy check ``libcpp-uglify-attributes``.
107107
Use C++11 extensions in C++03 code if they simplify the code
108108
============================================================
109109

110-
libc++ only supports Clang in C++98/03 mode. Clang provides many C++11 features in C++03, making it possible to write a
111-
lot of code in a simpler way than if we were restricted to C++03 features. Some use of extensions is even mandatory,
112-
since libc++ supports move semantics in C++03.
110+
libc++ supports the C++98/03 mode only with the Clang compiler. Clang provides many C++11 features
111+
in C++03, making it possible to write a lot of code in a simpler way than if we were restricted to C++03 features.
112+
Some use of extensions is even mandatory, since libc++ supports move semantics in C++03.
113113

114114
Use ``using`` aliases instead of ``typedef``
115115
============================================

libcxx/docs/Hardening.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ modes are:
3232
including heuristic checks that might have significant performance overhead as
3333
well as internal library assertions. This mode should be used in
3434
non-production environments (such as test suites, CI, or local development).
35-
We don’t commit to a particular level of performance in this mode and it’s
36-
*not* intended to be used in production.
35+
We do not commit to a particular level of performance in this mode.
36+
In particular, this mode is *not* intended to be used in production.
3737

3838
.. note::
3939

@@ -155,13 +155,13 @@ easier to reason about the high-level semantics of a hardening mode.
155155
in the library -- whatever the consequences are, they will happen in the user
156156
code.
157157

158-
- ``pedantic`` -- checks preconditions that are imposed by the Standard, but
159-
violating which happens to be benign in libc++.
158+
- ``pedantic`` -- checks preconditions that are imposed by the C++ standard,
159+
but violating which happens to be benign in libc++.
160160

161161
- ``semantic-requirement`` -- checks that the given argument satisfies the
162-
semantic requirements imposed by the Standard. Typically, there is no simple
163-
way to completely prove that a semantic requirement is satisfied; thus, this
164-
would often be a heuristic check and it might be quite expensive.
162+
semantic requirements imposed by the C++ standard. Typically, there is no
163+
simple way to completely prove that a semantic requirement is satisfied;
164+
thus, this would often be a heuristic check and it might be quite expensive.
165165

166166
- ``internal`` -- checks that internal invariants of the library hold. These
167167
assertions don't depend on user input.
@@ -239,7 +239,7 @@ Mapping between the hardening modes and the assertion categories
239239

240240
.. note::
241241

242-
The categories enabled by each mode are subject to change and users should not
242+
The categories enabled by each mode are subject to change. Users should not
243243
rely on the precise assertions enabled by a mode at a given point in time.
244244
However, the library does guarantee to keep the hardening modes stable and
245245
to fulfill the semantics documented here.

libcxx/docs/ImplementationDefinedBehavior.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
Implementation-defined behavior
55
===============================
66

7-
Contains the implementation details of the implementation-defined behavior in
8-
libc++. Implementation-defined is mandated to be documented by the Standard.
7+
This document contains the implementation details of the implementation-defined behavior in libc++.
8+
The C++ standard mandates that implementation-defined behavior is documented.
99

1010
.. note:
1111
This page is far from complete.
@@ -17,7 +17,7 @@ Implementation-defined behavior
1717
Updating the Time Zone Database
1818
-------------------------------
1919

20-
The Standard allows implementations to automatically update the
20+
The C++ standard allows implementations to automatically update the
2121
*remote time zone database*. Libc++ opts not to do that. Instead calling
2222

2323
- ``std::chrono::remote_version()`` will update the version information of the
@@ -32,7 +32,7 @@ give them full control over the process.
3232
`[ostream.formatted.print]/3 <http://eel.is/c++draft/ostream.formatted.print#3>`_ A terminal capable of displaying Unicode
3333
--------------------------------------------------------------------------------------------------------------------------
3434

35-
The Standard specifies that the manner in which a stream is determined to refer
35+
The C++ standard specifies that the manner in which a stream is determined to refer
3636
to a terminal capable of displaying Unicode is implementation-defined. This is
3737
used for ``std::print`` and similar functions taking an ``ostream&`` argument.
3838

@@ -55,9 +55,9 @@ Libc++ determines that a stream is Unicode-capable terminal by:
5555
----------------------------------------------------------------------------------------
5656

5757
Most functions within the Mathematical Special Functions section contain integral indices.
58-
The Standard specifies the result for larger indices as implementation-defined.
58+
The C++ standard specifies the result for larger indices as implementation-defined.
5959
Libc++ pursuits reasonable results by choosing the same formulas as for indices below that threshold.
60-
E.g.
60+
E.g.,
6161

6262
- ``std::hermite(unsigned n, T x)`` for ``n >= 128``
6363

libcxx/docs/Modules.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Overview
2424

2525
The module sources are stored in ``.cppm`` files. Modules need to be available
2626
as BMIs, which are ``.pcm`` files for Clang. BMIs are not portable, they depend
27-
on the compiler used and its compilation flags. Therefore there needs to be a
27+
on the compiler and the compilation flags used. Therefore there needs to be a
2828
way to distribute the ``.cppm`` files to the user and offer a way for them to
2929
build and use the ``.pcm`` files. It is expected this will be done by build
3030
systems in the future. To aid early adaptor and build system vendors libc++

0 commit comments

Comments
 (0)