Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions libcxx/docs/Hardening.rst
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,11 @@ Notes:
behavior; the ``observe`` semantic is meant to make adopting hardening easier
but should not be used outside of the adoption period;
- C++26 wording for Library Hardening precludes a conforming Hardened
implementation from using the Contracts ``ignore`` semantic when evaluating
hardened preconditions in the Library. Libc++ allows using this semantic for
hardened preconditions, but please be aware that using ``ignore`` does not
produce a conforming "Hardened" implementation, unlike the other semantics
above.
implementation from using a Contracts' non-terminating semantic (i.e.,
``ignore`` or ``observe``) when evaluating hardened preconditions in the
Library. Libc++ allows using these semantics for hardened preconditions, but
please be aware that using ``ignore`` or ``observe`` does not produce
a conforming "Hardened" implementation, unlike the terminating semantics above.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
a conforming "Hardened" implementation, unlike the terminating semantics above.
a "Hardened" implementation, unlike the terminating semantics above.

Would be better IMO - we're not a hardened implementation in these cases so there isn't much of a point in claiming "we're a non-conforming implementation", which makes it sound like we're just technically not.


The default assertion semantics are as follows:

Expand Down
8 changes: 4 additions & 4 deletions libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ _LIBCPP_HARDENING_MODE_DEBUG
// Notes:
// - Continuing execution after a hardening check fails results in undefined behavior; the `observe` semantic is meant
// to make adopting hardening easier but should not be used outside of this scenario;
// - C++26 wording for Library Hardening precludes a conforming Hardened implementation from using the Contracts
// `ignore` semantic when evaluating hardened preconditions in the Library. Libc++ allows using this semantic for
// hardened preconditions, however, be aware that using `ignore` does not produce a conforming "Hardened"
// implementation, unlike the other semantics above.
// - C++26 wording for Library Hardening precludes a conforming Hardened implementation from using a Contracts'
// non-terminating semantic (i.e., `ignore` or ``observe``) when evaluating hardened preconditions in the Library.
// Libc++ allows using these semantics for hardened preconditions, however, be aware that using `ignore` or `observe`
// does not produce a conforming "Hardened" implementation, unlike the terminating semantics above.
// clang-format off
# define _LIBCPP_ASSERTION_SEMANTIC_IGNORE (1 << 1)
# define _LIBCPP_ASSERTION_SEMANTIC_OBSERVE (1 << 2)
Expand Down
Loading