Skip to content

Commit e9eff08

Browse files
authored
Merge pull request #85731 from Xazax-hun/suppress-arc-warning
[cxx-interop] Suppress warning in non-arc Obj-C++
2 parents 92cbcb6 + 501cc36 commit e9eff08

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lib/PrintAsClang/PrintAsClang.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,8 @@ static void writePostImportPrologue(raw_ostream &os, ModuleDecl &M) {
567567
"#pragma clang diagnostic ignored \"-Wunknown-pragmas\"\n"
568568
"#pragma clang diagnostic ignored \"-Wnullability\"\n"
569569
"#pragma clang diagnostic ignored "
570+
"\"-Warc-bridge-casts-disallowed-in-nonarc\"\n"
571+
"#pragma clang diagnostic ignored "
570572
"\"-Wdollar-in-identifier-extension\"\n"
571573
"#pragma clang diagnostic ignored "
572574
"\"-Wunsafe-buffer-usage\"\n"

test/Interop/SwiftToObjCxx/optional-objc-class-in-obj-cxx.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
// RUN: %target-swift-frontend %s -module-name UseCoreFoundation -enable-experimental-cxx-interop -clang-header-expose-decls=all-public -typecheck -verify -emit-clang-header-path %t/UseCoreFoundation.h
44
// RUN: %target-interop-build-clangxx -std=gnu++20 -fobjc-arc -c -x objective-c++-header %t/UseCoreFoundation.h -o %t/o.o
5+
// RUN: %target-interop-build-clangxx -Werror=arc-bridge-casts-disallowed-in-nonarc -std=gnu++20 -fno-objc-arc -c -x objective-c++-header %t/UseCoreFoundation.h -o %t/o.o
56

67
// REQUIRES: objc_interop
78

@@ -14,3 +15,7 @@ public class TestFoundationType {
1415
_bundle = bundle
1516
}
1617
}
18+
19+
public func getArray() -> [String] {
20+
[]
21+
}

0 commit comments

Comments
 (0)