Skip to content

Commit b3c428c

Browse files
authored
Merge pull request #86108 from Xazax-hun/redundant-semicolons
[cxx-interop][NFC] Remove some redundant semicolons in a test
2 parents fbb4b25 + 58baaba commit b3c428c

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

test/Interop/Cxx/foreign-reference/Inputs/inheritance.h

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ struct __attribute__((swift_attr("import_reference")))
106106
__attribute__((swift_attr("retain:immortal")))
107107
__attribute__((swift_attr("release:immortal"))) ImmortalRefType {};
108108

109-
ImmortalRefType *returnImmortalRefType() { return new ImmortalRefType(); };
109+
ImmortalRefType *returnImmortalRefType() { return new ImmortalRefType(); }
110110

111111
struct DerivedFromImmortalRefType : ImmortalRefType {};
112112
DerivedFromImmortalRefType *returnDerivedFromImmortalRefType() { // expected-note {{annotate 'returnDerivedFromImmortalRefType()' with either SWIFT_RETURNS_RETAINED or SWIFT_RETURNS_UNRETAINED}}
@@ -151,13 +151,13 @@ DerivedFromRefTypeAndAnnotated *returnDerivedFromRefTypeAndAnnotated() { // expe
151151
}
152152
} // namespace ExplicitAnnotationHasPrecedence1
153153

154-
void ret1(ExplicitAnnotationHasPrecedence1::RefType *v) {};
155-
void rel1(ExplicitAnnotationHasPrecedence1::RefType *v) {};
154+
void ret1(ExplicitAnnotationHasPrecedence1::RefType *v) {}
155+
void rel1(ExplicitAnnotationHasPrecedence1::RefType *v) {}
156156

157157
void ret2(
158-
ExplicitAnnotationHasPrecedence1::DerivedFromValueTypeAndAnnotated *v) {};
158+
ExplicitAnnotationHasPrecedence1::DerivedFromValueTypeAndAnnotated *v) {}
159159
void rel2(
160-
ExplicitAnnotationHasPrecedence1::DerivedFromValueTypeAndAnnotated *v) {};
160+
ExplicitAnnotationHasPrecedence1::DerivedFromValueTypeAndAnnotated *v) {}
161161

162162
void ret3(ExplicitAnnotationHasPrecedence1::DerivedFromRefTypeAndAnnotated *v) {
163163
};
@@ -189,24 +189,24 @@ DerivedFromRefTypeAAndBAnnotated *returnDerivedFromRefTypeAAndBAnnotated() { //
189189
}
190190
} // namespace ExplicitAnnotationHasPrecedence2
191191

192-
void retain_A(ExplicitAnnotationHasPrecedence2::RefTypeA *v) {};
193-
void release_A(ExplicitAnnotationHasPrecedence2::RefTypeA *v) {};
194-
void retain_B(ExplicitAnnotationHasPrecedence2::RefTypeB *v) {};
195-
void release_B(ExplicitAnnotationHasPrecedence2::RefTypeB *v) {};
192+
void retain_A(ExplicitAnnotationHasPrecedence2::RefTypeA *v) {}
193+
void release_A(ExplicitAnnotationHasPrecedence2::RefTypeA *v) {}
194+
void retain_B(ExplicitAnnotationHasPrecedence2::RefTypeB *v) {}
195+
void release_B(ExplicitAnnotationHasPrecedence2::RefTypeB *v) {}
196196
void retain_C(
197-
ExplicitAnnotationHasPrecedence2::DerivedFromRefTypeAAndBAnnotated *v) {};
197+
ExplicitAnnotationHasPrecedence2::DerivedFromRefTypeAAndBAnnotated *v) {}
198198
void release_C(
199-
ExplicitAnnotationHasPrecedence2::DerivedFromRefTypeAAndBAnnotated *v) {};
199+
ExplicitAnnotationHasPrecedence2::DerivedFromRefTypeAAndBAnnotated *v) {}
200200

201201
namespace BasicInheritanceExample {
202202
struct ValueType {};
203-
ValueType *returnValueType() { return new ValueType(); };
203+
ValueType *returnValueType() { return new ValueType(); }
204204

205205
struct __attribute__((swift_attr("import_reference")))
206206
__attribute__((swift_attr("retain:RCRetain")))
207207
__attribute__((swift_attr("release:RCRelease"))) RefType {};
208208

209-
RefType *returnRefType() { return new RefType(); }; // expected-note {{annotate 'returnRefType()' with either SWIFT_RETURNS_RETAINED or SWIFT_RETURNS_UNRETAINED}}
209+
RefType *returnRefType() { return new RefType(); } // expected-note {{annotate 'returnRefType()' with either SWIFT_RETURNS_RETAINED or SWIFT_RETURNS_UNRETAINED}}
210210

211211
struct DerivedFromRefType final : RefType {};
212212
DerivedFromRefType *returnDerivedFromRefType() { // expected-note {{annotate 'returnDerivedFromRefType()' with either SWIFT_RETURNS_RETAINED or SWIFT_RETURNS_UNRETAINED}}
@@ -261,7 +261,7 @@ __attribute__((swift_attr("retain:bRetain3")))
261261
__attribute__((swift_attr("release:bRelease3"))) B3 {};
262262

263263
struct D : B1, B2, B3 {}; // expected-warning {{unable to infer SWIFT_SHARED_REFERENCE for 'D', although one of its transitive base types is marked as SWIFT_SHARED_REFERENCE}}
264-
D *returnD() { return new D(); };
264+
D *returnD() { return new D(); }
265265
} // namespace MultipleInheritanceExample2
266266

267267
void bRetain1(MultipleInheritanceExample2::B1 *v) {}
@@ -335,18 +335,18 @@ struct B : A {};
335335
struct C : A {};
336336

337337
struct Diamond : B, C {}; // expected-warning {{unable to infer SWIFT_SHARED_REFERENCE for 'Diamond', although one of its transitive base types is marked as SWIFT_SHARED_REFERENCE}}
338-
Diamond *returnDiamond() { return new Diamond(); };
338+
Diamond *returnDiamond() { return new Diamond(); }
339339

340340
struct BVirtual : virtual A {};
341341

342342
struct CVirtual : virtual A {};
343343

344344
struct VirtualDiamond : BVirtual, CVirtual {};
345-
VirtualDiamond *returnVirtualDiamond() { return new VirtualDiamond(); }; // expected-note {{annotate 'returnVirtualDiamond()' with either SWIFT_RETURNS_RETAINED or SWIFT_RETURNS_UNRETAINED}}
345+
VirtualDiamond *returnVirtualDiamond() { return new VirtualDiamond(); } // expected-note {{annotate 'returnVirtualDiamond()' with either SWIFT_RETURNS_RETAINED or SWIFT_RETURNS_UNRETAINED}}
346346
} // namespace RefTypeDiamondInheritance
347347

348-
void retainA(RefTypeDiamondInheritance::A *a) {};
349-
void releaseA(RefTypeDiamondInheritance::A *a) {};
348+
void retainA(RefTypeDiamondInheritance::A *a) {}
349+
void releaseA(RefTypeDiamondInheritance::A *a) {}
350350

351351
namespace NonRefTypeDiamondInheritance {
352352
struct A {};
@@ -358,12 +358,12 @@ __attribute__((swift_attr("release:releaseB"))) B : A {};
358358
struct C : A {};
359359

360360
struct Diamond : B, C {};
361-
Diamond *returnDiamond() { return new Diamond(); }; // expected-note {{annotate 'returnDiamond()' with either SWIFT_RETURNS_RETAINED or SWIFT_RETURNS_UNRETAINED}}
361+
Diamond *returnDiamond() { return new Diamond(); } // expected-note {{annotate 'returnDiamond()' with either SWIFT_RETURNS_RETAINED or SWIFT_RETURNS_UNRETAINED}}
362362

363363
} // namespace NonRefTypeDiamondInheritance
364364

365-
void retainB(NonRefTypeDiamondInheritance::B *a) {};
366-
void releaseB(NonRefTypeDiamondInheritance::B *a) {};
365+
void retainB(NonRefTypeDiamondInheritance::B *a) {}
366+
void releaseB(NonRefTypeDiamondInheritance::B *a) {}
367367

368368
namespace InheritingTemplatedRefType {
369369

@@ -387,7 +387,7 @@ __attribute__((swift_attr("retain:forestRetain"))) __attribute__((
387387
};
388388

389389
class Forest : public IntrusiveRefCountedTemplate<Forest> {};
390-
Forest *returnForest() { return new Forest(); }; // expected-note {{annotate 'returnForest()' with either SWIFT_RETURNS_RETAINED or SWIFT_RETURNS_UNRETAINED}}
390+
Forest *returnForest() { return new Forest(); } // expected-note {{annotate 'returnForest()' with either SWIFT_RETURNS_RETAINED or SWIFT_RETURNS_UNRETAINED}}
391391
} // namespace InheritingTemplatedRefType
392392

393393
void forestRetain(InheritingTemplatedRefType::IntrusiveRefCountedTemplate<

0 commit comments

Comments
 (0)