Skip to content

Commit c9fa650

Browse files
committed
[API Notes] Test SwiftPrivate API notes.
*Clang update required* Test that rdar://problem/25872038 works for Swift.
1 parent 85ba17b commit c9fa650

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

test/APINotes/Inputs/custom-modules/APINotesTest.apinotes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Functions:
55
Globals:
66
- Name: ANTGlobalValue
77
SwiftName: global
8+
- Name: will_be_private
9+
SwiftPrivate: true
810
Tags:
911
- Name: PointStruct
1012
SwiftName: Point

test/APINotes/Inputs/custom-modules/APINotesTest.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ typedef double real_t;
1010
typedef struct {
1111
struct PointStruct topLeft, bottomRight;
1212
} RectStruct;
13+
14+
extern double will_be_private;

test/APINotes/basic.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ func testSwiftName() {
1515

1616
let rect: Rect
1717
let rect2: RectStruct // expected-error{{use of undeclared type 'RectStruct'}}
18+
19+
let d: Double = __will_be_private
1820
}

0 commit comments

Comments
 (0)