Skip to content

Commit 051f4c4

Browse files
committed
Sema: Improve comments based on code review feedback
1 parent f0f2246 commit 051f4c4

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lib/Sema/TypeCheckAvailability.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,13 @@ enum class ExportabilityReason : unsigned {
6666
};
6767

6868
/// A description of the restrictions on what declarations can be referenced
69-
/// from a the signature or body of a declaration.
69+
/// from the signature or body of a declaration.
7070
///
71-
/// We say a declaration is "exported" if it is `public` or
72-
/// `@usableFromInline`, not `_@spi`, and not visible via an
73-
/// `@_implementationOnly` import.
71+
/// We say a declaration is "exported" if all of the following holds:
72+
///
73+
/// - the declaration is `public` or `@usableFromInline`
74+
/// - the declaration is not `@_spi`
75+
/// - the declaration was not imported from an `@_implementationOnly` import
7476
///
7577
/// The "signature" of a declaration is the set of all types written in the
7678
/// declaration (such as function parameter and return types), but not
@@ -81,8 +83,8 @@ enum class ExportabilityReason : unsigned {
8183
///
8284
/// The body of an inlinable function can only reference other `public` and
8385
/// `@usableFromInline` declarations; furthermore, if the inlinable
84-
/// function is also exported, its body is restricted to referencing other
85-
/// exported declarations.
86+
/// function is not `@_spi`, its body can only reference other exported
87+
/// declarations.
8688
///
8789
/// The ExportContext also stores if the location in the program is inside
8890
/// of a function or type body with deprecated or unavailable availability.

0 commit comments

Comments
 (0)