Skip to content

Commit 1607ecf

Browse files
committed
Fix warnings in loadable-types.h.
The copy and move assignment operators weren't returning anything and were hence producing "non-void function does not return a value" warnings. As the test doesn't actually need a definition for these operators, I've removed the definition and simply declared them.
1 parent c230622 commit 1607ecf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/Interop/Cxx/class/Inputs/loadable-types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct StructWithSubobjectMoveConstructor {
6060
};
6161

6262
struct StructWithCopyAssignment {
63-
StructWithCopyAssignment &operator=(const StructWithCopyAssignment &) {}
63+
StructWithCopyAssignment &operator=(const StructWithCopyAssignment &);
6464
};
6565

6666
struct StructWithInheritedCopyAssignment : StructWithCopyAssignment {};
@@ -70,7 +70,7 @@ struct StructWithSubobjectCopyAssignment {
7070
};
7171

7272
struct StructWithMoveAssignment {
73-
StructWithMoveAssignment &operator=(StructWithMoveAssignment &&) {}
73+
StructWithMoveAssignment &operator=(StructWithMoveAssignment &&);
7474
};
7575

7676
struct StructWithInheritedMoveAssignment : StructWithMoveAssignment {};

0 commit comments

Comments
 (0)