Skip to content

Commit 1e446b4

Browse files
authored
[cxx-interop] Suppress inaccessible-base warning from test (#85302)
Clang is helpfully telling us that one of the base types is inaccessible, except we don't really care about that because we are only using this type for testing other diagnostics. That warning is getting caught by the newly comprehensive swiftc diagnostic verifier, so we suppress it with a Clang pragma. rdar://163875420
1 parent 98560e5 commit 1e446b4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,11 @@ struct __attribute__((swift_attr("import_reference")))
288288
__attribute__((swift_attr("retain:retain1")))
289289
__attribute__((swift_attr("release:release1"))) B3 : B1 {};
290290

291+
#pragma clang diagnostic push
292+
#pragma clang diagnostic ignored "-Winaccessible-base"
291293
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}}
292294
D *returnD() { return new D(); };
295+
#pragma clang diagnostic pop
293296
} // namespace MultipleInheritanceExample3
294297

295298
void retain1(MultipleInheritanceExample3::B1 *v) {}

0 commit comments

Comments
 (0)