Skip to content

Commit 8348a98

Browse files
committed
cleanup
1 parent 0442dbd commit 8348a98

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/unittests/ADT/FunctionExtrasTest.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,17 +317,15 @@ TEST(UniqueFunctionTest, MovedFromStateIsDestroyedCorrectly) {
317317
static int NumOfDestructorsCalled = 0;
318318
struct State {
319319
State() = default;
320-
State(const State &) = delete;
321320
State(State &&) { ++NumOfMovesCalled; }
322-
State &operator=(const State &) = delete;
323-
State &operator=(State &&Rhs) { return *new (this) State{std::move(Rhs)}; }
324321
~State() { ++NumOfDestructorsCalled; }
325322
};
326323
{
327324
unique_function<void()> CapturingFunction{[state = State{}] {}};
328325
unique_function<void()> CapturingFunctionMoved{
329326
std::move(CapturingFunction)};
330327
}
328+
printf("%i, %i\n", NumOfMovesCalled, NumOfDestructorsCalled);
331329
EXPECT_EQ(NumOfDestructorsCalled, 1 + NumOfMovesCalled);
332330
}
333331

0 commit comments

Comments
 (0)