Skip to content

Commit 1f11250

Browse files
committed
[NFC][RequirementMachine] Add documentation for diagnoseRequirementErrors.
1 parent e6dc7e6 commit 1f11250

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/AST/RequirementMachine/RequirementLowering.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,19 @@ void swift::rewriting::realizeInheritedRequirements(
530530
}
531531
}
532532

533+
/// Emit diagnostics for the given \c RequirementErrors.
534+
///
535+
/// \param ctx The AST context, which is used to determine whether
536+
/// requirement machine protocol signatures are enabled. If not,
537+
/// diagnostics will not be emitted.
538+
/// \param errors The set of requirement diagnostics to be emitted.
539+
/// \param allowConcreteGenericParams Whether concrete type parameters
540+
/// are permitted in the generic signature. If true, diagnostics will
541+
/// offer fix-its to turn invalid type requirements, e.g. T: Int, into
542+
/// same-type requirements.
543+
///
544+
/// \returns true if any errors were emitted, and false otherwise (including
545+
/// when only warnings were emitted).
533546
bool swift::rewriting::diagnoseRequirementErrors(
534547
ASTContext &ctx, SmallVectorImpl<RequirementError> &errors,
535548
bool allowConcreteGenericParams) {

0 commit comments

Comments
 (0)