Skip to content

Commit fcc4bf5

Browse files
committed
swift-module-digester: don't blindly include initializer decls. rdar://45418572
1 parent da4fc05 commit fcc4bf5

File tree

5 files changed

+0
-277
lines changed

5 files changed

+0
-277
lines changed

test/api-digester/Outputs/Cake-abi.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ cake1: Protocol P3 has generic signature change from <τ_0_0 : P1, τ_0_0 : P2>
99
cake1: AssociatedType RequiementChanges.removedType has been removed
1010
cake1: Class C3 has been removed
1111
cake1: Constructor Somestruct2.init(_:) has been removed
12-
cake1: Constructor fixedLayoutStruct.init(b:a:) has been removed
13-
cake1: Constructor fixedLayoutStruct2.init(NoLongerWithFixedBinaryOrder:) has been removed
1412
cake1: Func C4.foo() has been removed
1513
cake1: Func RequiementChanges.removedFunc() has been removed
1614
cake1: Subscript RemoveSetters.subscript(_:) has removed its setter

test/api-digester/Outputs/Cake.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ cake1: Protocol P3 has generic signature change from <Self : P1, Self : P2> to <
88
/* Removed Decls */
99
cake1: AssociatedType RequiementChanges.removedType has been removed
1010
cake1: Constructor Somestruct2.init(_:) has been removed
11-
cake1: Constructor fixedLayoutStruct.init(b:a:) has been removed
1211
cake1: Func C4.foo() has been removed
1312
cake1: Func RequiementChanges.removedFunc() has been removed
1413
cake1: Subscript RemoveSetters.subscript(_:) has removed its setter

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

Lines changed: 0 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -126,24 +126,6 @@
126126
"usr": "s:4cake2S1V4foo6yyF",
127127
"moduleName": "cake",
128128
"funcSelfKind": "NonMutating"
129-
},
130-
{
131-
"kind": "Constructor",
132-
"name": "init",
133-
"printedName": "init()",
134-
"children": [
135-
{
136-
"kind": "TypeNominal",
137-
"name": "S1",
138-
"printedName": "S1",
139-
"usr": "s:4cake2S1V"
140-
}
141-
],
142-
"declKind": "Constructor",
143-
"usr": "s:4cake2S1VACycfc",
144-
"moduleName": "cake",
145-
"implicit": true,
146-
"isInternal": true
147129
}
148130
],
149131
"declKind": "Struct",
@@ -170,42 +152,6 @@
170152
"name": "C0",
171153
"printedName": "C0",
172154
"children": [
173-
{
174-
"kind": "Constructor",
175-
"name": "init",
176-
"printedName": "init()",
177-
"children": [
178-
{
179-
"kind": "TypeNominal",
180-
"name": "C0",
181-
"printedName": "C0<τ_0_0, τ_0_1, τ_0_2>",
182-
"children": [
183-
{
184-
"kind": "TypeNominal",
185-
"name": "GenericTypeParam",
186-
"printedName": "τ_0_0"
187-
},
188-
{
189-
"kind": "TypeNominal",
190-
"name": "GenericTypeParam",
191-
"printedName": "τ_0_1"
192-
},
193-
{
194-
"kind": "TypeNominal",
195-
"name": "GenericTypeParam",
196-
"printedName": "τ_0_2"
197-
}
198-
],
199-
"usr": "s:4cake2C0C"
200-
}
201-
],
202-
"declKind": "Constructor",
203-
"usr": "s:4cake2C0CACyxq_q0_Gycfc",
204-
"moduleName": "cake",
205-
"genericSig": "<τ_0_0, τ_0_1, τ_0_2>",
206-
"implicit": true,
207-
"isInternal": true
208-
},
209155
{
210156
"kind": "Function",
211157
"name": "conditionalFooExt",
@@ -418,25 +364,6 @@
418364
"fixedbinaryorder": 1,
419365
"ownership": 2,
420366
"hasStorage": true
421-
},
422-
{
423-
"kind": "Constructor",
424-
"name": "init",
425-
"printedName": "init()",
426-
"children": [
427-
{
428-
"kind": "TypeNominal",
429-
"name": "C1",
430-
"printedName": "C1",
431-
"usr": "s:4cake2C1C"
432-
}
433-
],
434-
"declKind": "Constructor",
435-
"usr": "s:4cake2C1CACycfc",
436-
"moduleName": "cake",
437-
"overriding": true,
438-
"implicit": true,
439-
"isInternal": true
440367
}
441368
],
442369
"declKind": "Class",
@@ -951,60 +878,6 @@
951878
"fixedbinaryorder": 3,
952879
"isLet": true,
953880
"hasStorage": true
954-
},
955-
{
956-
"kind": "Constructor",
957-
"name": "init",
958-
"printedName": "init(a:b:c:)",
959-
"children": [
960-
{
961-
"kind": "TypeNominal",
962-
"name": "fixedLayoutStruct",
963-
"printedName": "fixedLayoutStruct",
964-
"usr": "s:4cake17fixedLayoutStructV"
965-
},
966-
{
967-
"kind": "TypeNominal",
968-
"name": "Int",
969-
"printedName": "Int",
970-
"usr": "s:Si"
971-
},
972-
{
973-
"kind": "TypeNominal",
974-
"name": "Int",
975-
"printedName": "Int",
976-
"usr": "s:Si"
977-
},
978-
{
979-
"kind": "TypeNominal",
980-
"name": "Int",
981-
"printedName": "Int",
982-
"usr": "s:Si"
983-
}
984-
],
985-
"declKind": "Constructor",
986-
"usr": "s:4cake17fixedLayoutStructV1a1b1cACSi_S2itc33_3D8926C30F7417F2EF9A277D0C73FBDBLlfc",
987-
"moduleName": "cake",
988-
"implicit": true,
989-
"isInternal": true
990-
},
991-
{
992-
"kind": "Constructor",
993-
"name": "init",
994-
"printedName": "init()",
995-
"children": [
996-
{
997-
"kind": "TypeNominal",
998-
"name": "fixedLayoutStruct",
999-
"printedName": "fixedLayoutStruct",
1000-
"usr": "s:4cake17fixedLayoutStructV"
1001-
}
1002-
],
1003-
"declKind": "Constructor",
1004-
"usr": "s:4cake17fixedLayoutStructVACycfc",
1005-
"moduleName": "cake",
1006-
"implicit": true,
1007-
"isInternal": true
1008881
}
1009882
],
1010883
"declKind": "Struct",
@@ -1324,24 +1197,6 @@
13241197
],
13251198
"fixedbinaryorder": 0,
13261199
"hasStorage": true
1327-
},
1328-
{
1329-
"kind": "Constructor",
1330-
"name": "init",
1331-
"printedName": "init()",
1332-
"children": [
1333-
{
1334-
"kind": "TypeNominal",
1335-
"name": "UsableFromInlineClass",
1336-
"printedName": "UsableFromInlineClass",
1337-
"usr": "s:4cake21UsableFromInlineClassC"
1338-
}
1339-
],
1340-
"declKind": "Constructor",
1341-
"usr": "s:4cake21UsableFromInlineClassCACycfc",
1342-
"moduleName": "cake",
1343-
"implicit": true,
1344-
"isInternal": true
13451200
}
13461201
],
13471202
"declKind": "Class",

test/api-digester/Outputs/cake.json

Lines changed: 0 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -133,24 +133,6 @@
133133
"usr": "s:4cake2S1V4foo6yyF",
134134
"moduleName": "cake",
135135
"funcSelfKind": "NonMutating"
136-
},
137-
{
138-
"kind": "Constructor",
139-
"name": "init",
140-
"printedName": "init()",
141-
"children": [
142-
{
143-
"kind": "TypeNominal",
144-
"name": "S1",
145-
"printedName": "S1",
146-
"usr": "s:4cake2S1V"
147-
}
148-
],
149-
"declKind": "Constructor",
150-
"usr": "s:4cake2S1VACycfc",
151-
"moduleName": "cake",
152-
"implicit": true,
153-
"isInternal": true
154136
}
155137
],
156138
"declKind": "Struct",
@@ -177,42 +159,6 @@
177159
"name": "C0",
178160
"printedName": "C0",
179161
"children": [
180-
{
181-
"kind": "Constructor",
182-
"name": "init",
183-
"printedName": "init()",
184-
"children": [
185-
{
186-
"kind": "TypeNominal",
187-
"name": "C0",
188-
"printedName": "C0<T1, T2, T3>",
189-
"children": [
190-
{
191-
"kind": "TypeNominal",
192-
"name": "GenericTypeParam",
193-
"printedName": "T1"
194-
},
195-
{
196-
"kind": "TypeNominal",
197-
"name": "GenericTypeParam",
198-
"printedName": "T2"
199-
},
200-
{
201-
"kind": "TypeNominal",
202-
"name": "GenericTypeParam",
203-
"printedName": "T3"
204-
}
205-
],
206-
"usr": "s:4cake2C0C"
207-
}
208-
],
209-
"declKind": "Constructor",
210-
"usr": "s:4cake2C0CACyxq_q0_Gycfc",
211-
"moduleName": "cake",
212-
"genericSig": "<T1, T2, T3>",
213-
"implicit": true,
214-
"isInternal": true
215-
},
216162
{
217163
"kind": "Function",
218164
"name": "conditionalFooExt",
@@ -459,25 +405,6 @@
459405
],
460406
"ownership": 2,
461407
"hasStorage": true
462-
},
463-
{
464-
"kind": "Constructor",
465-
"name": "init",
466-
"printedName": "init()",
467-
"children": [
468-
{
469-
"kind": "TypeNominal",
470-
"name": "C1",
471-
"printedName": "C1",
472-
"usr": "s:4cake2C1C"
473-
}
474-
],
475-
"declKind": "Constructor",
476-
"usr": "s:4cake2C1CACycfc",
477-
"moduleName": "cake",
478-
"overriding": true,
479-
"implicit": true,
480-
"isInternal": true
481408
}
482409
],
483410
"declKind": "Class",
@@ -883,60 +810,6 @@
883810
"HasInitialValue"
884811
],
885812
"hasStorage": true
886-
},
887-
{
888-
"kind": "Constructor",
889-
"name": "init",
890-
"printedName": "init(a:b:c:)",
891-
"children": [
892-
{
893-
"kind": "TypeNominal",
894-
"name": "fixedLayoutStruct",
895-
"printedName": "fixedLayoutStruct",
896-
"usr": "s:4cake17fixedLayoutStructV"
897-
},
898-
{
899-
"kind": "TypeNominal",
900-
"name": "Int",
901-
"printedName": "Int",
902-
"usr": "s:Si"
903-
},
904-
{
905-
"kind": "TypeNominal",
906-
"name": "Int",
907-
"printedName": "Int",
908-
"usr": "s:Si"
909-
},
910-
{
911-
"kind": "TypeNominal",
912-
"name": "Int",
913-
"printedName": "Int",
914-
"usr": "s:Si"
915-
}
916-
],
917-
"declKind": "Constructor",
918-
"usr": "s:4cake17fixedLayoutStructV1a1b1cACSi_S2itc33_3D8926C30F7417F2EF9A277D0C73FBDBLlfc",
919-
"moduleName": "cake",
920-
"implicit": true,
921-
"isInternal": true
922-
},
923-
{
924-
"kind": "Constructor",
925-
"name": "init",
926-
"printedName": "init()",
927-
"children": [
928-
{
929-
"kind": "TypeNominal",
930-
"name": "fixedLayoutStruct",
931-
"printedName": "fixedLayoutStruct",
932-
"usr": "s:4cake17fixedLayoutStructV"
933-
}
934-
],
935-
"declKind": "Constructor",
936-
"usr": "s:4cake17fixedLayoutStructVACycfc",
937-
"moduleName": "cake",
938-
"implicit": true,
939-
"isInternal": true
940813
}
941814
],
942815
"declKind": "Struct",

tools/swift-api-digester/ModuleAnalyzerNodes.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,8 +1324,6 @@ SDKContext::shouldIgnore(Decl *D, const Decl* Parent) const {
13241324
if (AvailableAttr::isUnavailable(D))
13251325
return true;
13261326
}
1327-
if (isa<ConstructorDecl>(D))
1328-
return false;
13291327
if (auto VD = dyn_cast<ValueDecl>(D)) {
13301328
if (VD->getBaseName().empty())
13311329
return true;

0 commit comments

Comments
 (0)