[libcxx-commits] [PATCH] D155349: [libc++][hardening] Categorize most assertions inside the container classes.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 18 08:19:24 PDT 2023


Mordante added a comment.

In D155349#4507154 <https://reviews.llvm.org/D155349#4507154>, @ldionne wrote:

> In D155349#4503312 <https://reviews.llvm.org/D155349#4503312>, @Mordante wrote:
>
>> Once we expose these names to users it will be a lot harder to change them.
>
> Just to clarify, the intent is that those names are private. Users should only toggle the high-level options `_LIBCPP_ENABLE_HARDENED_MODE` and `_LIBCPP_ENABLE_DEBUG_MODE`. We specifically didn't want to lock ourselves into these categories if we wanted to change them later on.

That was not clear to me from the patch. When this is not a "user flag" I feel less strongly about picking the best name. Thanks for the clarification @ldionne.



================
Comment at: libcxx/include/__config:236
 
-// Available checks:
+// Available assertion categories:
 
----------------
ldionne wrote:
> You should make it clear that this is "internal documentation". Maybe something like:
> 
> ```
> Inside the library, assertions are categorized so they can be cherry-picked based on the hardening mode. Those are internal-only macros, users should stick to the high-level modes above.
> ```
+1


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155349/new/

https://reviews.llvm.org/D155349



More information about the libcxx-commits mailing list