Skip to content

Commit 13e0e72

Browse files
committed
Update api-digester tool
1 parent d1d308f commit 13e0e72

File tree

3 files changed

+115
-2
lines changed

3 files changed

+115
-2
lines changed

test/api-digester/Outputs/cake-abi.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,6 +1482,22 @@
14821482
"ObjC"
14831483
],
14841484
"funcSelfKind": "NonMutating"
1485+
},
1486+
{
1487+
"kind": "Function",
1488+
"name": "functionUnavailableOnMac",
1489+
"printedName": "functionUnavailableOnMac()",
1490+
"children": [
1491+
{
1492+
"kind": "TypeNominal",
1493+
"name": "Void",
1494+
"printedName": "()"
1495+
}
1496+
],
1497+
"declKind": "Func",
1498+
"usr": "s:4cake14SwiftObjcClassC24functionUnavailableOnMacyyF",
1499+
"moduleName": "cake",
1500+
"funcSelfKind": "NonMutating"
14851501
}
14861502
],
14871503
"declKind": "Class",
@@ -1493,6 +1509,24 @@
14931509
],
14941510
"hasMissingDesignatedInitializers": true
14951511
},
1512+
{
1513+
"kind": "TypeDecl",
1514+
"name": "UnavailableOnMac",
1515+
"printedName": "UnavailableOnMac",
1516+
"declKind": "Class",
1517+
"usr": "s:4cake16UnavailableOnMacC",
1518+
"moduleName": "cake",
1519+
"intro_iOS": "10.2",
1520+
"intro_tvOS": "10.3",
1521+
"intro_watchOS": "3.4",
1522+
"declAttributes": [
1523+
"Available",
1524+
"Available",
1525+
"Available",
1526+
"Available"
1527+
],
1528+
"hasMissingDesignatedInitializers": true
1529+
},
14961530
{
14971531
"kind": "TypeDecl",
14981532
"name": "Int",

test/api-digester/stability-stdlib-abi-without-asserts.test

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,82 @@
2727
// The digester can incorrectly register a generic signature change when
2828
// declarations are shuffled. rdar://problem/46618883
2929
// UNSUPPORTED: swift_evolve
30+
31+
//===----------------------------------------------------------------------===//
32+
// Obsoleted or unavailable declarations (previously ignored by api-digester).
33+
//===----------------------------------------------------------------------===//
34+
35+
// stdlib/public/core/AtomicInt.swift.gyb
36+
Class _stdlib_AtomicInt is a new API without @available attribute
37+
38+
// stdlib/public/core/FloatingPointTypes.swift.gyb
39+
Func %(_:_:) is a new API without @available attribute
40+
Func %=(_:_:) is a new API without @available attribute
41+
Var Double.isSignMinus is a new API without @available attribute
42+
Var Double.quietNaN is a new API without @available attribute
43+
Var Float.isSignMinus is a new API without @available attribute
44+
Var Float.quietNaN is a new API without @available attribute
45+
Var Float80.quietNaN is a new API without @available attribute
46+
47+
// stdlib/public/core/IntegerTypes.swift.gyb
48+
Constructor Int32.init(bitPattern:) is a new API without @available attribute
49+
Constructor Int64.init(bitPattern:) is a new API without @available attribute
50+
51+
// stdlib/public/core/LegacyABI.swift
52+
Func String._withUTF8(_:) is a new API without @available attribute
53+
Func Substring._withUTF8(_:) is a new API without @available attribute
54+
Func Unicode.UTF16._isASCII(_:) is a new API without @available attribute
55+
Func _isASCII(_:) is a new API without @available attribute
56+
Func _isContinuation(_:) is a new API without @available attribute
57+
Var Substring._wholeString is a new API without @available attribute
58+
59+
// stdlib/public/core/MigrationSupport.swift
60+
Constructor ClosedRange.init(_:) is a new API without @available attribute
61+
Constructor Range.init(_:) is a new API without @available attribute
62+
Constructor UnsafeMutableRawPointer.init(_:) is a new API without @available attribute
63+
Constructor _PlaygroundQuickLook.init(reflecting:) is a new API without @available attribute
64+
Func Collection.distance(from:to:) is a new API without @available attribute
65+
Func Collection.flatMap(_:) is a new API without @available attribute
66+
Func Collection.formIndex(_:offsetBy:) is a new API without @available attribute
67+
Func Collection.formIndex(_:offsetBy:limitedBy:) is a new API without @available attribute
68+
Func Collection.index(_:offsetBy:) is a new API without @available attribute
69+
Func Collection.index(_:offsetBy:limitedBy:) is a new API without @available attribute
70+
Func String.withMutableCharacters(_:) is a new API without @available attribute
71+
Func Substring.withMutableCharacters(_:) is a new API without @available attribute
72+
Func UnsafeMutablePointer.deallocate(capacity:) is a new API without @available attribute
73+
Func UnsafeMutablePointer.deinitialize() is a new API without @available attribute
74+
Func UnsafeMutablePointer.initialize(from:) is a new API without @available attribute
75+
Func UnsafeMutablePointer.initialize(to:count:) is a new API without @available attribute
76+
Func UnsafeMutableRawBufferPointer.allocate(count:) is a new API without @available attribute
77+
Func UnsafeMutableRawBufferPointer.copyBytes(from:) is a new API without @available attribute
78+
Func UnsafeMutableRawPointer.allocate(bytes:alignedTo:) is a new API without @available attribute
79+
Func UnsafeMutableRawPointer.copyBytes(from:count:) is a new API without @available attribute
80+
Func UnsafeMutableRawPointer.deallocate(bytes:alignedTo:) is a new API without @available attribute
81+
Func UnsafeMutableRawPointer.initializeMemory(as:at:count:to:) is a new API without @available attribute
82+
Func UnsafeMutableRawPointer.initializeMemory(as:from:) is a new API without @available attribute
83+
Var String.characters is a new API without @available attribute
84+
Var Substring.characters is a new API without @available attribute
85+
86+
// stdlib/public/core/SIMDVector.swift
87+
Func SIMD.*(_:_:) is a new API without @available attribute
88+
Func SIMD.*=(_:_:) is a new API without @available attribute
89+
Func SIMD.+(_:_:) is a new API without @available attribute
90+
Func SIMD.+=(_:_:) is a new API without @available attribute
91+
Func SIMD.-(_:_:) is a new API without @available attribute
92+
Func SIMD.-=(_:_:) is a new API without @available attribute
93+
94+
// stdlib/public/core/StringRangeReplaceableCollection.swift
95+
Func Sequence.+(_:_:) is a new API without @available attribute
96+
97+
// stdlib/public/core/UnavailableStringAPIs.swift
98+
Subscript String.subscript(_:) is a new API without @available attribute
99+
100+
// stdlib/public/core/Unicode.swift
101+
Func transcode(_:_:_:_:stopOnError:) is a new API without @available attribute
102+
103+
// stdlib/public/core/UnicodeScalar.swift
104+
Constructor Unicode.Scalar.init() is a new API without @available attribute
105+
106+
// stdlib/public/core/UnsafeRawBufferPointer.swift.gyb
107+
Subscript UnsafeMutableRawBufferPointer.subscript(_:) is a new API without @available attribute
108+
Subscript UnsafeRawBufferPointer.subscript(_:) is a new API without @available attribute

tools/swift-api-digester/ModuleAnalyzerNodes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,9 +1611,9 @@ SDKContext::shouldIgnore(Decl *D, const Decl* Parent) const {
16111611
} else {
16121612
if (D->isPrivateStdlibDecl(false))
16131613
return true;
1614+
if (AvailableAttr::isUnavailable(D))
1615+
return true;
16141616
}
1615-
if (AvailableAttr::isUnavailable(D))
1616-
return true;
16171617
if (auto VD = dyn_cast<ValueDecl>(D)) {
16181618
switch (getAccessLevel(VD)) {
16191619
case AccessLevel::Internal:

0 commit comments

Comments
 (0)