[libcxx-commits] [libcxx] [libc++] Mini-cleanup for `[[nodiscard]]` (PR #172275)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Dec 15 02:55:54 PST 2025
================
@@ -50,15 +50,15 @@ enum class copy_options : unsigned short {
return static_cast<copy_options>(~static_cast<unsigned short>(__lhs));
}
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline copy_options& operator&=(copy_options& __lhs, copy_options __rhs) {
+_LIBCPP_HIDE_FROM_ABI inline copy_options& operator&=(copy_options& __lhs, copy_options __rhs) {
return __lhs = __lhs & __rhs;
}
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline copy_options& operator|=(copy_options& __lhs, copy_options __rhs) {
+_LIBCPP_HIDE_FROM_ABI inline copy_options& operator|=(copy_options& __lhs, copy_options __rhs) {
return __lhs = __lhs | __rhs;
}
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline copy_options& operator^=(copy_options& __lhs, copy_options __rhs) {
+_LIBCPP_HIDE_FROM_ABI inline copy_options& operator^=(copy_options& __lhs, copy_options __rhs) {
return __lhs = __lhs ^ __rhs;
}
----------------
philnik777 wrote:
Please add a regression test. I wasn't able to find any tests for these functions, so it'd be appreciated if they were added. That would probably have caught this.
https://github.com/llvm/llvm-project/pull/172275
More information about the libcxx-commits
mailing list