mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ConstExtract: Update for noncopyable generics (sort of)
This commit is contained in:
@@ -776,6 +776,10 @@ void writeResultBuilderInformation(llvm::json::OStream &JSON,
|
||||
|
||||
for (ProtocolDecl *Decl :
|
||||
TypeDecl->getLocalProtocols(ConformanceLookupKind::All)) {
|
||||
// FIXME(noncopyable_generics): Should these be included?
|
||||
if (Decl->getInvertibleProtocolKind())
|
||||
continue;
|
||||
|
||||
for (auto Member : Decl->getMembers()) {
|
||||
if (auto *VD = dyn_cast<swift::VarDecl>(Member)) {
|
||||
if (VD->getName() != VarDecl->getName())
|
||||
@@ -840,9 +844,16 @@ void writeSubstitutedOpaqueTypeAliasDetails(
|
||||
// Ignore requirements whose subject type is that of the owner decl
|
||||
if (!Requirement.getFirstType()->isEqual(OpaqueTy.getInterfaceType()))
|
||||
continue;
|
||||
if (Requirement.getKind() == RequirementKind::Conformance)
|
||||
JSON.value(
|
||||
toFullyQualifiedProtocolNameString(*Requirement.getProtocolDecl()));
|
||||
|
||||
if (Requirement.getKind() != RequirementKind::Conformance)
|
||||
continue;
|
||||
|
||||
// FIXME(noncopyable_generics): Should these be included?
|
||||
if (Requirement.getProtocolDecl()->getInvertibleProtocolKind())
|
||||
continue;
|
||||
|
||||
JSON.value(
|
||||
toFullyQualifiedProtocolNameString(*Requirement.getProtocolDecl()));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -920,7 +931,11 @@ void writeProperties(llvm::json::OStream &JSON,
|
||||
void writeConformances(llvm::json::OStream &JSON,
|
||||
const NominalTypeDecl &NomTypeDecl) {
|
||||
JSON.attributeArray("conformances", [&] {
|
||||
for (auto &Protocol : NomTypeDecl.getAllProtocols()) {
|
||||
for (auto *Protocol : NomTypeDecl.getAllProtocols()) {
|
||||
// FIXME(noncopyable_generics): Should these be included?
|
||||
if (Protocol->getInvertibleProtocolKind())
|
||||
continue;
|
||||
|
||||
JSON.value(toFullyQualifiedProtocolNameString(*Protocol));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -172,4 +172,3 @@ public struct DeprecatedAnnotations: MyProto {}
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT:]
|
||||
|
||||
// XFAIL: noncopyable_generics
|
||||
|
||||
@@ -156,6 +156,3 @@ public struct Bat {
|
||||
// CHECK-NEXT: ]
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT:]
|
||||
|
||||
// XFAIL: noncopyable_generics
|
||||
|
||||
|
||||
@@ -65,6 +65,3 @@ enum DirectOnEnum {
|
||||
// CHECK: "kind": "enum",
|
||||
// CHECK: "cases": [
|
||||
// CHECK: "name": "yes"
|
||||
|
||||
// XFAIL: noncopyable_generics
|
||||
|
||||
|
||||
@@ -227,6 +227,3 @@ public struct Enums: MyProto {
|
||||
// CHECK-NEXT: ]
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT:]
|
||||
|
||||
// XFAIL: noncopyable_generics
|
||||
|
||||
|
||||
@@ -31,6 +31,3 @@ extension MyType {
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ]
|
||||
|
||||
// XFAIL: noncopyable_generics
|
||||
|
||||
|
||||
@@ -333,6 +333,3 @@ extension String: Foo {}
|
||||
// CHECK-NEXT: ]
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT:]
|
||||
|
||||
// XFAIL: noncopyable_generics
|
||||
|
||||
|
||||
@@ -548,6 +548,3 @@ public struct PropertyWrappers : MyProto {
|
||||
// CHECK-NEXT: ]
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT:]
|
||||
|
||||
// XFAIL: noncopyable_generics
|
||||
|
||||
|
||||
@@ -55,6 +55,3 @@ struct Foo<L : Hashable> : myProto {
|
||||
// CHECK-NEXT: "properties": []
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ]
|
||||
|
||||
// XFAIL: noncopyable_generics
|
||||
|
||||
|
||||
@@ -71,6 +71,3 @@ private func baz() -> some protoA<testModBStruct> & protoB<Float> & testModBProt
|
||||
// CHECK-NEXT: "properties": []
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT:]
|
||||
|
||||
// XFAIL: noncopyable_generics
|
||||
|
||||
|
||||
@@ -113,6 +113,3 @@ public struct MyFooProviderInferred: FooProvider {
|
||||
// CHECK-NEXT: ]
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ]
|
||||
|
||||
// XFAIL: noncopyable_generics
|
||||
|
||||
|
||||
Reference in New Issue
Block a user