Skip to content

Commit c17966e

Browse files
authored
Merge pull request #32426 from xedin/diag-overhaul-followup
[TypeChecker] NFC: Revise comments for `{typeCheck, solve}ForCodeComp…
2 parents cc523be + 6c85c7f commit c17966e

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

lib/Sema/CSSolver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,8 +1406,8 @@ void ConstraintSystem::solveForCodeCompletion(
14061406
SolverState state(cs, FreeTypeVariableBinding::Disallow);
14071407

14081408
// Enable "diagnostic mode" by default, this means that
1409-
// solver would produce "fixed" solutions along side of
1410-
// valid ones, which helps code completion to rank choices.
1409+
// solver would produce "fixed" solutions alongside valid
1410+
// ones, which helps code completion to rank choices.
14111411
state.recordFixes = true;
14121412

14131413
cs.solveImpl(solutions);

lib/Sema/ConstraintSystem.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4731,17 +4731,16 @@ class ConstraintSystem {
47314731
/// Construct and solve a system of constraints based on the given expression
47324732
/// and its contextual information.
47334733
///
4734-
/// This menthod is designed to be used for code completion which means that
4734+
/// This method is designed to be used for code completion which means that
47354735
/// it doesn't mutate given expression, even if there is a single valid
47364736
/// solution, and constraint solver is allowed to produce partially correct
4737-
/// solutions, such solutions can have any number of holes in them, alongside
4738-
/// with valid ones.
4737+
/// solutions. Such solutions can have any number of holes in them.
47394738
///
47404739
/// \param expr The expression involved in code completion.
47414740
///
47424741
/// \param DC The declaration context this expression is found in.
47434742
///
4744-
/// \param contextualType The type expression is being converted to.
4743+
/// \param contextualType The type \p expr is being converted to.
47454744
///
47464745
/// \param CTP When contextualType is specified, this indicates what
47474746
/// the conversion is doing.

lib/Sema/TypeChecker.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -703,10 +703,10 @@ FunctionType *getTypeOfCompletionOperator(DeclContext *DC, Expr *LHS,
703703
/// Type check the given expression and provide results back to code completion
704704
/// via specified callback.
705705
///
706-
/// This menthod is designed to be used for code completion which means that
707-
/// it doesn't mutate AST and constraint solver is allowed to produce partially
708-
/// correct solutions, such solutions can have any number of holes in them,
709-
/// alongside with valid ones.
706+
/// This method is designed to be used for code completion which means that
707+
/// it doesn't mutate given expression, even if there is a single valid
708+
/// solution, and constraint solver is allowed to produce partially correct
709+
/// solutions. Such solutions can have any number of holes in them.
710710
void typeCheckForCodeCompletion(
711711
Expr *expr, DeclContext *DC, Type contextualType, ContextualTypePurpose CTP,
712712
llvm::function_ref<void(const constraints::Solution &)> callback);

0 commit comments

Comments
 (0)