[libcxx-commits] [libcxx] 9803196 - [libc++][NFC] Fix unparenthesized comma expression in mem-initializer (#89605)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Apr 22 07:14:58 PDT 2024
Author: Krystian Stasiowski
Date: 2024-04-22T10:14:54-04:00
New Revision: 9803196849bd9c473aba7ead03da9aee5591f373
URL: https://github.com/llvm/llvm-project/commit/9803196849bd9c473aba7ead03da9aee5591f373
DIFF: https://github.com/llvm/llvm-project/commit/9803196849bd9c473aba7ead03da9aee5591f373.diff
LOG: [libc++][NFC] Fix unparenthesized comma expression in mem-initializer (#89605)
#84050 resolves class member access expressions naming members of the
current instantiation prior to instantiation. In testing, it has
revealed a mem-initializer in the move constructor of
`invocable_with_telemetry` that uses an unparenthesized comma expression
to initialize a non-static data member of pointer type. This patch fixes it.
Added:
Modified:
libcxx/test/support/invocable_with_telemetry.h
Removed:
################################################################################
diff --git a/libcxx/test/support/invocable_with_telemetry.h b/libcxx/test/support/invocable_with_telemetry.h
index 612bbec639d466..e010837a1624cd 100644
--- a/libcxx/test/support/invocable_with_telemetry.h
+++ b/libcxx/test/support/invocable_with_telemetry.h
@@ -31,7 +31,7 @@ class invocable_with_telemetry {
constexpr invocable_with_telemetry(invocable_with_telemetry&& other)
requires std::move_constructible<F>
: f_(std::move(other.f_)),
- telemetry_(assert(other.telemetry_ != nullptr), std::exchange(other.telemetry_, nullptr)) {
+ telemetry_((assert(other.telemetry_ != nullptr), std::exchange(other.telemetry_, nullptr))) {
++telemetry_->moves;
}
More information about the libcxx-commits
mailing list