[libcxx-commits] [PATCH] D141812: [libc++] Introduce _LIBCPP_HIDE_FROM_ABI_NAMESPACE_STD
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 16 09:44:29 PST 2023
Mordante added a comment.
I'm not convinced this is an improvement.
There are restrictions to what can be placed in the "namespace". It also removes the attribute from the reader. To know whether a function is hidden from the ABI you need to look at the "namespace" the object is placed in and for member functions you still need use the macro.
For the small example the readability remains the same, but in the end it doesn't save a lot of code.
Are structs/classes/unions the only exception, what about enum/enum class?
When doing this the visibly documentation needs to be updated too.
Maybe it would be good to discuss this patch on Discord.
================
Comment at: libcxx/test/tools/clang_tidy_checks/hide_from_abi.cpp:16
+bool is_hide_from_abi_namespace(std::string_view str) {
+ return str.size() == strlen("__MAMIPA") && str.starts_with("__");
+}
----------------
`__MAMIPA`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141812/new/
https://reviews.llvm.org/D141812
More information about the libcxx-commits
mailing list