Skip to content

Commit

Permalink
fix violations of -Wshadow under llvm-17
Browse files Browse the repository at this point in the history
Reviewed By: dmm-fb

Differential Revision: D64237210

fbshipit-source-id: a79e3b93a0c3e2c9f08820f0a97ea78c574d3d2a
  • Loading branch information
yfeldblum authored and facebook-github-bot committed Oct 11, 2024
1 parent c9a1436 commit 0ffc50b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions folly/coro/test/BlockingWaitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,19 +320,19 @@ TEST_F(BlockingWaitTest, ReleaseExecutorFromAnotherThread) {
auto fn = []() {
auto [p1, f1] = folly::makePromiseContract<folly::Executor::KeepAlive<>>();
auto [p2, f2] = folly::makePromiseContract<folly::Unit>();
std::thread t{[&, &p2 = p2, &f1 = f1] {
auto e = std::move(f1).get();
p2.setValue(folly::Unit{});
std::thread t{[&, &p2_ = p2, &f1_ = f1] {
auto e = std::move(f1_).get();
p2_.setValue(folly::Unit{});
std::this_thread::sleep_for(std::chrono::microseconds(1));
e = {};
}};
folly::ManualExecutor executor;
folly::coro::blockingWait(
[&, &p1 = p1, &f2 = f2]() -> folly::coro::Task<void> {
[&, &p1_ = p1, &f2_ = f2]() -> folly::coro::Task<void> {
folly::Executor::KeepAlive<> taskExecutor =
co_await folly::coro::co_current_executor;
p1.setValue(std::move(taskExecutor));
co_await std::move(f2);
p1_.setValue(std::move(taskExecutor));
co_await std::move(f2_);
}());
t.join();
};
Expand Down
4 changes: 2 additions & 2 deletions folly/coro/test/CoroTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ TEST_F(CoroTest, TimedWaitFuture) {
futures::sleep(std::chrono::milliseconds{200})
.via(ex)
.thenValue(
[lifetimePromise = std::move(lifetimePromise)](Unit) mutable {
lifetimePromise.setValue();
[lifetimePromise_ = std::move(lifetimePromise)](Unit) mutable {
lifetimePromise_.setValue();
return 42;
});
auto slowResult = co_await coro::timed_wait(
Expand Down

0 comments on commit 0ffc50b

Please sign in to comment.