Skip to content

Commit 7c2030b

Browse files
committed
Small fixes
1 parent 075384e commit 7c2030b

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

libcxx/docs/Hardening.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Assertion categories
9393
====================
9494

9595
Inside the library, individual assertions are grouped into different
96-
_categories_. Each hardening mode enables a different set of assertion
96+
*categories*. Each hardening mode enables a different set of assertion
9797
categories; categories provide an additional layer of abstraction that makes it
9898
easier to reason about the high-level semantics of a hardening mode.
9999

@@ -170,7 +170,7 @@ Mapping between the hardening modes and the assertion categories
170170
:header-rows: 1
171171
:widths: auto
172172

173-
* -
173+
* - Category name
174174
- ``fast``
175175
- ``extensive``
176176
- ``debug``
@@ -238,6 +238,7 @@ immediately traps the program. This is the safest approach that also minimizes
238238
the code size penalty as the failure handler maps to a single instruction. The
239239
downside is that the failure provides no additional details other than the stack
240240
trace (which might also be affected by optimizations).
241+
241242
TODO(hardening): describe ``__builtin_verbose_trap`` once we can use it.
242243

243244
In the ``debug`` mode, an assertion failure terminates the program in an
@@ -293,8 +294,7 @@ Vendors can use the following ABI options to enable additional hardening checks:
293294

294295
Supported containers:
295296
- ``span``;
296-
- ``string_view``;
297-
- ``array``.
297+
- ``string_view``.
298298

299299
ABI tags
300300
--------
@@ -310,13 +310,14 @@ a binary and determine whether it was built with hardening enabled.
310310
informational purposes only.
311311

312312
The first character of an ABI tag encodes the hardening mode:
313+
313314
- ``f`` -- [f]ast mode;
314315
- ``s`` -- extensive ("[s]afe") mode;
315316
- ``d`` -- [d]ebug mode;
316317
- ``n`` -- [n]one mode.
317318

318-
Hardened containers
319-
===================
319+
Hardened containers status
320+
==========================
320321

321322
.. list-table::
322323
:header-rows: 1
@@ -344,7 +345,7 @@ Hardened containers
344345
- ✅
345346
- ❌
346347
* - ``forward_list``
347-
-
348+
-
348349
- ❌
349350
* - ``deque``
350351
- ✅
@@ -372,5 +373,3 @@ Further reading
372373

373374
- ``_Hardening RFC <https://discourse.llvm.org/t/rfc-hardening-in-libc/73925>``:
374375
contains some of the design rationale.
375-
376-
:ref:`hardening mode <using-hardening-modes>`

libcxx/include/__config

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -583,11 +583,11 @@ typedef __char32_t char32_t;
583583
# endif
584584

585585
// TODO: Remove this workaround once we drop support for Clang 16
586-
#if __has_warning("-Wc++23-extensions")
587-
# define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED_CXX23_EXTENSION _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wc++23-extensions")
588-
#else
589-
# define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED_CXX23_EXTENSION _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wc++2b-extensions")
590-
#endif
586+
# if __has_warning("-Wc++23-extensions")
587+
# define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED_CXX23_EXTENSION _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wc++23-extensions")
588+
# else
589+
# define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED_CXX23_EXTENSION _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wc++2b-extensions")
590+
# endif
591591

592592
// Clang modules take a significant compile time hit when pushing and popping diagnostics.
593593
// Since all the headers are marked as system headers in the modulemap, we can simply disable this

libcxx/include/__configuration/abi.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@
127127
//
128128
// Supported containers:
129129
// - `span`;
130-
// - `string_view`;
131-
// - `array`.
130+
// - `string_view`.
132131
// #define _LIBCPP_ABI_BOUNDED_ITERATORS
133132

134133
#if defined(_LIBCPP_COMPILER_CLANG_BASED)

0 commit comments

Comments
 (0)