mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[NFC] Fold The Tri-State In Optional<ProtocolConformanceRef>
ProtocolConformanceRef already has an invalid state. Drop all of the uses of Optional<ProtocolConformanceRef> and just use ProtocolConformanceRef::forInvalid() to represent it. Mechanically translate all of the callers and callsites to use this new representation.
This commit is contained in:
@@ -409,19 +409,18 @@ public:
|
||||
/// \returns The result of the conformance search, which will be
|
||||
/// None if the type does not conform to the protocol or contain a
|
||||
/// ProtocolConformanceRef if it does conform.
|
||||
Optional<ProtocolConformanceRef>
|
||||
lookupConformance(Type type, ProtocolDecl *protocol);
|
||||
ProtocolConformanceRef lookupConformance(Type type, ProtocolDecl *protocol);
|
||||
|
||||
/// Look for the conformance of the given existential type to the given
|
||||
/// protocol.
|
||||
Optional<ProtocolConformanceRef>
|
||||
lookupExistentialConformance(Type type, ProtocolDecl *protocol);
|
||||
ProtocolConformanceRef lookupExistentialConformance(Type type,
|
||||
ProtocolDecl *protocol);
|
||||
|
||||
/// Exposes TypeChecker functionality for querying protocol conformance.
|
||||
/// Returns a valid ProtocolConformanceRef only if all conditional
|
||||
/// requirements are successfully resolved.
|
||||
Optional<ProtocolConformanceRef>
|
||||
conformsToProtocol(Type sourceTy, ProtocolDecl *targetProtocol);
|
||||
ProtocolConformanceRef conformsToProtocol(Type sourceTy,
|
||||
ProtocolDecl *targetProtocol);
|
||||
|
||||
/// Find a member named \p name in \p container that was declared in this
|
||||
/// module.
|
||||
|
||||
Reference in New Issue
Block a user