Skip to content

Spelling ide #42467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 111 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
895ef15
spelling: active
jsoref Apr 17, 2022
910c061
spelling: address
jsoref Apr 17, 2022
3142ef8
spelling: ambiguous
jsoref Nov 6, 2022
c201611
spelling: approximation
jsoref Apr 17, 2022
676a162
spelling: asynchronously
jsoref Apr 17, 2022
eb606cf
spelling: attributes
jsoref Apr 17, 2022
1477483
spelling: autoclosure
jsoref Apr 17, 2022
3d0f620
spelling: before
jsoref Apr 17, 2022
937c322
spelling: builder
jsoref Nov 6, 2022
c587885
spelling: cached
jsoref Apr 17, 2022
5222ee9
spelling: catch
jsoref Apr 17, 2022
ab7a0c4
spelling: class
jsoref Apr 17, 2022
85323e6
spelling: classifier
jsoref Apr 17, 2022
6720b22
spelling: clazz
jsoref Apr 17, 2022
ff44773
spelling: common
jsoref Apr 17, 2022
687593a
spelling: completed
jsoref Apr 17, 2022
84ea5e2
spelling: completion
jsoref Apr 19, 2022
bf7b167
spelling: condition
jsoref Apr 17, 2022
893edc8
spelling: conforming
jsoref Apr 17, 2022
f519ea4
spelling: constrained
jsoref Nov 6, 2022
d67e52e
spelling: constraint
jsoref Apr 17, 2022
fe438ef
spelling: constructors
jsoref Apr 17, 2022
a95a0dc
spelling: contextual
jsoref Apr 17, 2022
3772736
spelling: continuation
jsoref Apr 17, 2022
70e736d
spelling: couldn't
jsoref Apr 17, 2022
c49f57c
spelling: count
jsoref Apr 17, 2022
2c4f32a
spelling: creator
jsoref Apr 17, 2022
b3b6935
spelling: cursor
jsoref Apr 17, 2022
c45c92c
spelling: declaration
jsoref Apr 17, 2022
35a4f4e
spelling: declarations
jsoref Apr 17, 2022
38bf322
spelling: default
jsoref Apr 17, 2022
363e845
spelling: delegate
jsoref Apr 17, 2022
27bfbc1
spelling: dependencies
jsoref Apr 17, 2022
83c092a
spelling: dependency
jsoref Apr 17, 2022
29747ce
spelling: derived
jsoref Apr 17, 2022
da0d200
spelling: different
jsoref Apr 17, 2022
762039f
spelling: discarded
jsoref Apr 17, 2022
b2d2a19
spelling: don't crash
jsoref Apr 17, 2022
88b73e4
spelling: empty
jsoref Apr 17, 2022
ba87bdb
spelling: endpreamble
jsoref Apr 17, 2022
39df561
spelling: enlightening
jsoref Nov 6, 2022
48eab59
spelling: entity
jsoref Apr 17, 2022
8b21ede
spelling: equality
jsoref Apr 17, 2022
4e373f8
spelling: erroneous
jsoref Apr 17, 2022
c7e50a1
spelling: example
jsoref Apr 17, 2022
cf2808e
spelling: expected
jsoref Apr 17, 2022
092b74d
spelling: expects
jsoref Apr 17, 2022
e77c43c
spelling: explanation
jsoref Apr 17, 2022
a9fa9b2
spelling: explicit
jsoref Apr 17, 2022
56edd3d
spelling: expression
jsoref Apr 17, 2022
31349b9
spelling: extract
jsoref Apr 17, 2022
259cc7e
spelling: global
jsoref Apr 17, 2022
03d4c30
spelling: implicit
jsoref Apr 17, 2022
302b226
spelling: indicator
jsoref Apr 17, 2022
4535825
spelling: indices
jsoref Apr 17, 2022
e1387bd
spelling: initializers
jsoref Apr 17, 2022
d17fdba
spelling: inside
jsoref Apr 17, 2022
5d98db8
spelling: instance
jsoref Apr 17, 2022
4dbc42a
spelling: interesting
jsoref Apr 17, 2022
832112c
spelling: interface
jsoref Apr 17, 2022
6132ab9
spelling: interpret
jsoref Apr 17, 2022
b2701db
spelling: invoke
jsoref Apr 17, 2022
b61ba1c
spelling: itself
jsoref Nov 6, 2022
a3485ca
spelling: mergeable
jsoref Apr 17, 2022
6eaf4fa
spelling: misspelled
jsoref Apr 17, 2022
ee32971
spelling: multi
jsoref Apr 17, 2022
50d2264
spelling: multiple
jsoref Apr 17, 2022
f8d50c1
spelling: mutually
jsoref Apr 17, 2022
dcb345a
spelling: nospace
jsoref Nov 6, 2022
1126225
spelling: occurrences
jsoref Apr 17, 2022
fcf9e13
spelling: overridden
jsoref Apr 17, 2022
d03d1a7
spelling: overriding
jsoref Nov 6, 2022
93abdb1
spelling: parameter
jsoref Apr 17, 2022
618fc32
spelling: parameters
jsoref Apr 17, 2022
9227582
spelling: pattern
jsoref Apr 17, 2022
2c15a0f
spelling: perform
jsoref Apr 18, 2022
7100c61
spelling: position
jsoref Apr 17, 2022
3daa6d0
spelling: precede
jsoref Apr 17, 2022
72c9993
spelling: preceding
jsoref Apr 17, 2022
327ac96
spelling: properties
jsoref Apr 17, 2022
91b9eb9
spelling: reasonable
jsoref Apr 17, 2022
717e1b9
spelling: recommended
jsoref Nov 6, 2022
af905b0
spelling: remaining
jsoref Apr 17, 2022
a9c6d2d
spelling: representable
jsoref Apr 17, 2022
4f4be50
spelling: required
jsoref Apr 17, 2022
0d9fdf8
spelling: requirement
jsoref Apr 17, 2022
b04d753
spelling: responsible
jsoref Apr 17, 2022
7973a69
spelling: return
jsoref Apr 17, 2022
d135fdd
spelling: reusable
jsoref Apr 17, 2022
abde3c1
spelling: reusing
jsoref Apr 17, 2022
31d452a
spelling: should
jsoref Apr 17, 2022
03fb3f3
spelling: signature
jsoref Apr 17, 2022
26a2a43
spelling: single
jsoref Apr 17, 2022
912f334
spelling: specifier
jsoref Apr 17, 2022
ab5d946
spelling: subscript
jsoref Apr 17, 2022
de1b8bd
spelling: syntax
jsoref Apr 17, 2022
c447045
spelling: synthesized
jsoref Apr 17, 2022
fabe1c9
spelling: that
jsoref Apr 17, 2022
d3448c3
spelling: the
jsoref Apr 17, 2022
5cffea2
spelling: throws
jsoref Apr 17, 2022
d14dbbe
spelling: tracking
jsoref Apr 17, 2022
5d2469c
spelling: type
jsoref Nov 7, 2022
0987b44
spelling: typecheck
jsoref Apr 17, 2022
7bf805e
spelling: unknown
jsoref Apr 17, 2022
56f6e22
spelling: unresolved
jsoref Apr 17, 2022
be5a508
spelling: variables
jsoref Nov 6, 2022
3fd5453
spelling: vector
jsoref Apr 17, 2022
888fa89
spelling: version
jsoref Apr 17, 2022
f0c3acd
spelling: visited
jsoref Apr 17, 2022
6aea8c3
spelling: whitespace
jsoref Apr 17, 2022
f695d64
spelling: with
jsoref Apr 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/swift/IDE/CancellableResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class CancellableResult {
/// \p Handle with either the transformed value or the failure or cancelled
/// result.
/// The \c async part of the map means that the transform might happen
/// asyncronously. This function does not introduce asynchronicity by itself.
/// asynchronously. This function does not introduce asynchronicity by itself.
/// \p Transform might also invoke the callback synchronously.
template <typename NewResultType>
void
Expand Down
8 changes: 4 additions & 4 deletions include/swift/IDE/CodeCompletionResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ enum class CompletionKind : uint8_t {
ForEachInKw,
AfterPoundExpr,
AfterPoundDirective,
PlatformConditon,
PlatformCondition,
AfterIfStmtElse,
GenericRequirement,
PrecedenceGroup,
Expand Down Expand Up @@ -265,7 +265,7 @@ enum class NotRecommendedReason : uint8_t {
};

/// TODO: We consider deprecation warnings as context free although they don't
/// produce deprecation warnings insdide context that have the same or a
/// produce deprecation warnings inside context that have the same or a
/// stronger deprecation attribute.
/// E.g.
/// In SDK:
Expand Down Expand Up @@ -361,9 +361,9 @@ class ContextFreeCodeCompletionResult {
/// Memberwise initializer. \p AssociatedKInd is opaque and will be
/// interpreted based on \p Kind. If \p KnownOperatorKind is \c None and the
/// completion item is an operator, it will be determined based on the
/// compleiton string.
/// completion string.
///
/// \note The caller must ensure that the \p CompleitonString and all the
/// \note The caller must ensure that the \p CompletionString and all the
/// \c Ref types outlive this result, typically by storing them in the same
/// \c CodeCompletionResultSink as the result itself.
ContextFreeCodeCompletionResult(
Expand Down
2 changes: 1 addition & 1 deletion include/swift/IDE/CodeCompletionResultSink.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct CodeCompletionResultSink {
/// position.
bool addInitsToTopLevel = false;

/// Whether to perform "call pettern heuristics".
/// Whether to perform "call pattern heuristics".
bool enableCallPatternHeuristics = false;

/// Whether to include an item without any default arguments.
Expand Down
8 changes: 4 additions & 4 deletions include/swift/IDE/CodeCompletionResultType.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ class USRBasedTypeContext {
class ContextualType {
/// The types that the result type must be identical/convertible to to
/// compute the type relation. Needs to be a vector because for the
/// conextual type `some MyProto & MyOtherProto`, the return type must be
/// contextual type `some MyProto & MyOtherProto`, the return type must be
/// convertible to both \c MyProto and \c MyOtherProto to be considered
/// convertible.
llvm::SmallVector<const USRBasedType *, 1> Types;

public:
/// Compute the type relation of \p ResultType to this conextual type.
/// Compute the type relation of \p ResultType to this contextual type.
CodeCompletionResultTypeRelation
typeRelation(const USRBasedType *ResultType,
const USRBasedType *VoidType) const;
Expand Down Expand Up @@ -227,7 +227,7 @@ class USRBasedType {
: USR(USR), Supertypes(Supertypes),
CustomAttributeKinds(CustomAttributeKinds) {}

/// Implementation of \c typeRelation. \p VisistedTypes keeps track which
/// Implementation of \c typeRelation. \p VisitedTypes keeps track which
/// types have already been visited.
CodeCompletionResultTypeRelation
typeRelationImpl(const USRBasedType *ResultType, const USRBasedType *VoidType,
Expand Down Expand Up @@ -286,7 +286,7 @@ class CodeCompletionResultType {
/// It would be nice if we could use a SmallVector to store those types
/// instead but \c CodeCompletionResultType is allocated in a bump
/// allocator and freeing the bump allocator does not call the
/// SmallVecotor's destructor, leaking potential heap memory. Since we only
/// SmallVector's destructor, leaking potential heap memory. Since we only
/// need two result types at the moment, I decided to implement it in a
/// hacky way with two pointers.
/// The \c getResultTypes and \c isApplicable methods mask away this
Expand Down
4 changes: 2 additions & 2 deletions include/swift/IDE/CodeCompletionStringPrinter.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ class CodeCompletionStringPrinter : public ASTPrinter {

/// Start \c AttributeAndModifierListBegin group. This must be called before
/// any attributes/modifiers printed to the output when printing an override
/// compleion.
/// completion.
void startPreamble();

/// End the current \c AttributeAndModifierListBegin group if it's still open.
/// This is automatically called before the main part of the signature.
void endPremable();
void endPreamble();

/// Implement \c ASTPrinter .
public:
Expand Down
4 changes: 2 additions & 2 deletions include/swift/IDE/CompletionLookup.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ bool KeyPathFilter(ValueDecl *decl, DeclVisibilityKind,
DynamicLookupInfo dynamicLookupInfo);

/// Returns \c true only if the completion is happening for top-level
/// declrarations. i.e.:
/// declarations. i.e.:
///
/// if condition {
/// #false#
Expand Down Expand Up @@ -604,7 +604,7 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {

void getPoundAvailablePlatformCompletions();

/// \p Loc is the location of the code completin token.
/// \p Loc is the location of the code completion token.
/// \p isForDeclResult determines if were are spelling out the result type
/// of a declaration.
void getSelfTypeCompletionInDeclContext(SourceLoc Loc, bool isForDeclResult);
Expand Down
2 changes: 1 addition & 1 deletion include/swift/IDE/IDERequestIDZone.def
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//===----------------------------------------------------------------------===//

SWIFT_REQUEST(IDE, CollectOverriddenDeclsRequest,
ArrayRef<ValueDecl *>(OverridenDeclsOwner), Cached,
ArrayRef<ValueDecl *>(OverriddenDeclsOwner), Cached,
NoLocationInfo)
SWIFT_REQUEST(IDE, CursorInfoRequest, ide::ResolvedCursorInfo(CursorInfoOwner),
Cached, NoLocationInfo)
Expand Down
22 changes: 11 additions & 11 deletions include/swift/IDE/IDERequests.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

namespace swift {
//----------------------------------------------------------------------------//
// Cusor info
// Cursor info
//----------------------------------------------------------------------------//

// Input for CursorInfoRequest.
Expand Down Expand Up @@ -171,36 +171,36 @@ class ProvideDefaultImplForRequest:
//----------------------------------------------------------------------------//
// CollectOverriddenDeclsRequest
//----------------------------------------------------------------------------//
struct OverridenDeclsOwner {
struct OverriddenDeclsOwner {
ValueDecl *VD;
bool IncludeProtocolRequirements;
bool Transitive;

OverridenDeclsOwner(ValueDecl *VD, bool IncludeProtocolRequirements,
OverriddenDeclsOwner(ValueDecl *VD, bool IncludeProtocolRequirements,
bool Transitive): VD(VD),
IncludeProtocolRequirements(IncludeProtocolRequirements),
Transitive(Transitive) {}

friend llvm::hash_code hash_value(const OverridenDeclsOwner &CI) {
friend llvm::hash_code hash_value(const OverriddenDeclsOwner &CI) {
return llvm::hash_combine(CI.VD,
CI.IncludeProtocolRequirements,
CI.Transitive);
}

friend bool operator==(const OverridenDeclsOwner &lhs,
const OverridenDeclsOwner &rhs) {
friend bool operator==(const OverriddenDeclsOwner &lhs,
const OverriddenDeclsOwner &rhs) {
return lhs.VD == rhs.VD &&
lhs.IncludeProtocolRequirements == rhs.IncludeProtocolRequirements &&
lhs.Transitive == rhs.Transitive;
}

friend bool operator!=(const OverridenDeclsOwner &lhs,
const OverridenDeclsOwner &rhs) {
friend bool operator!=(const OverriddenDeclsOwner &lhs,
const OverriddenDeclsOwner &rhs) {
return !(lhs == rhs);
}

friend void simple_display(llvm::raw_ostream &out,
const OverridenDeclsOwner &owner) {
const OverriddenDeclsOwner &owner) {
simple_display(out, owner.VD);
}
};
Expand All @@ -210,7 +210,7 @@ struct OverridenDeclsOwner {
/// requirements it satisfies in a conforming class
class CollectOverriddenDeclsRequest:
public SimpleRequest<CollectOverriddenDeclsRequest,
ArrayRef<ValueDecl*>(OverridenDeclsOwner),
ArrayRef<ValueDecl*>(OverriddenDeclsOwner),
RequestFlags::Cached> {
public:
using SimpleRequest::SimpleRequest;
Expand All @@ -220,7 +220,7 @@ class CollectOverriddenDeclsRequest:

// Evaluation.
ArrayRef<ValueDecl*> evaluate(Evaluator &evaluator,
OverridenDeclsOwner Owner) const;
OverriddenDeclsOwner Owner) const;

public:
// Caching
Expand Down
4 changes: 2 additions & 2 deletions include/swift/IDE/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ struct ResolvedRangeInfo {
CommonExprParent(CommonExprParent) {}
ResolvedRangeInfo(ArrayRef<Token> TokensInRange) :
ResolvedRangeInfo(RangeKind::Invalid, {nullptr, ExitState::Unsure},
TokensInRange, nullptr, /*Commom Expr Parent*/nullptr,
TokensInRange, nullptr, /*Common Expr Parent*/nullptr,
/*Single entry*/true, /*UnhandledEffects*/{},
OrphanKind::None, {}, {}, {}) {}
ResolvedRangeInfo(): ResolvedRangeInfo(ArrayRef<Token>()) {}
Expand Down Expand Up @@ -602,7 +602,7 @@ bool isDeclOverridable(ValueDecl *D);

/// Given a reference to a member \p D and its \p Base expression, return
/// whether that declaration could be dynamic, ie. may resolve to some other
/// declaration. Note that while the decl itself itself may be overridable, a
/// declaration. Note that while the decl itself may be overridable, a
/// reference to it is not necessarily "dynamic". Furthermore, is *not* the
/// `dynamic` keyword.
///
Expand Down
2 changes: 1 addition & 1 deletion include/swift/IDETool/CompileInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class CompileInstance {
DiagnosticDocumentationPath(DiagnosticDocumentationPath),
CachedCIInvalidated(false), CachedReuseCount(0) {}

/// NOTE: \p Args is only used for checking the equaity of the invocation.
/// NOTE: \p Args is only used for checking the equality of the invocation.
/// Since this function assumes that it is already normalized, exact the same
/// arguments including their order is considered as the same invocation.
bool
Expand Down
6 changes: 3 additions & 3 deletions include/swift/IDETool/CompletionInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class CompletionInstance {
Callback);

/// Calls \p Callback with new \c CompilerInstance for the completion
/// request. The \c CompilerInstace passed to the callback already performed
/// request. The \c CompilerInstance passed to the callback already performed
/// the first pass.
/// Returns \c false if it fails to setup the \c CompilerInstance.
void performNewOperation(
Expand All @@ -131,7 +131,7 @@ class CompletionInstance {
Callback);

/// Calls \p Callback with a \c CompilerInstance which is prepared for the
/// second pass. \p Callback is resposible to perform the second pass on it.
/// second pass. \p Callback is responsible to perform the second pass on it.
/// The \c CompilerInstance may be reused from the previous completions,
/// and may be cached for the next completion.
/// In case of failure or cancellation, the callback receives the
Expand All @@ -145,7 +145,7 @@ class CompletionInstance {
/// interpreting the results, since invalid results may be returned in case
/// of cancellation.
///
/// NOTE: \p Args is only used for checking the equaity of the invocation.
/// NOTE: \p Args is only used for checking the equality of the invocation.
/// Since this function assumes that it is already normalized, exact the same
/// arguments including their order is considered as the same invocation.
void performOperation(
Expand Down
4 changes: 2 additions & 2 deletions include/swift/Refactoring/RefactoringKinds.def
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ REFACTORING(GlobalRename, "Global Rename", rename.global)
/// (syntactically).
REFACTORING(FindGlobalRenameRanges, "Find Global Rename Ranges", rename.global.find-ranges)

/// Find and categorize all occurences of the file-local symbol at a given
/// Find and categorize all occurrences of the file-local symbol at a given
/// location.
REFACTORING(FindLocalRenameRanges, "Find Local Rename Ranges", rename.local.find-ranges)

/// Find and rename all occurences of the file-local symbol at a given
/// Find and rename all occurrences of the file-local symbol at a given
/// location.
CURSOR_REFACTORING(LocalRename, "Local Rename", rename.local)

Expand Down
26 changes: 13 additions & 13 deletions lib/IDE/CodeCompletion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class CodeCompletionCallbacksImpl : public CodeCompletionCallbacks {
/// In situations when \c SyntaxKind hints or determines
/// completions, i.e. a precedence group attribute, this
/// can be set and used to control the code completion scenario.
SyntaxKind SyntxKind;
SyntaxKind SyntaxKind_;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The obvious spelling fix would collide w/ the type. Offhand, this abbreviation doesn't appear to be used by this project. I'm open to suggestions. SK is taken below and Kind above.


int AttrParamIndex;
bool IsInSil = false;
Expand Down Expand Up @@ -470,7 +470,7 @@ void CodeCompletionCallbacksImpl::completeDeclAttrBeginning(
void CodeCompletionCallbacksImpl::completeInPrecedenceGroup(SyntaxKind SK) {
assert(P.Tok.is(tok::code_complete));

SyntxKind = SK;
SyntaxKind_ = SK;
Kind = CompletionKind::PrecedenceGroup;
CurDeclContext = P.CurDeclContext;
}
Expand Down Expand Up @@ -597,7 +597,7 @@ void CodeCompletionCallbacksImpl::completeAfterPoundDirective() {

void CodeCompletionCallbacksImpl::completePlatformCondition() {
CurDeclContext = P.CurDeclContext;
Kind = CompletionKind::PlatformConditon;
Kind = CompletionKind::PlatformCondition;
}

void CodeCompletionCallbacksImpl::completeAfterIfStmtElse() {
Expand Down Expand Up @@ -945,7 +945,7 @@ void CodeCompletionCallbacksImpl::addKeywords(CodeCompletionResultSink &Sink,
case CompletionKind::LabeledTrailingClosure:
case CompletionKind::AfterPoundExpr:
case CompletionKind::AfterPoundDirective:
case CompletionKind::PlatformConditon:
case CompletionKind::PlatformCondition:
case CompletionKind::GenericRequirement:
case CompletionKind::KeyPathExprObjC:
case CompletionKind::KeyPathExprSwift:
Expand All @@ -964,7 +964,7 @@ void CodeCompletionCallbacksImpl::addKeywords(CodeCompletionResultSink &Sink,
}

case CompletionKind::AccessorBeginning: {
// TODO: Omit already declared or mutally exclusive accessors.
// TODO: Omit already declared or mutually exclusive accessors.
// E.g. If 'get' is already declared, emit 'set' only.
addAccessorKeywords(Sink);

Expand Down Expand Up @@ -1258,23 +1258,23 @@ void swift::ide::deliverCompletionResults(
llvm::SmallPtrSet<Identifier, 8> seenModuleNames;
std::vector<RequestedCachedModule> RequestedModules;

SmallPtrSet<ModuleDecl *, 4> explictlyImportedModules;
SmallPtrSet<ModuleDecl *, 4> explicitlyImportedModules;
{
// Collect modules directly imported in this SourceFile.
SmallVector<ImportedModule, 4> directImport;
SF.getImportedModules(directImport,
{ModuleDecl::ImportFilterKind::Default,
ModuleDecl::ImportFilterKind::ImplementationOnly});
for (auto import : directImport)
explictlyImportedModules.insert(import.importedModule);
explicitlyImportedModules.insert(import.importedModule);

// Exclude modules implicitly imported in the current module.
auto implicitImports = SF.getParentModule()->getImplicitImports();
for (auto import : implicitImports.imports)
explictlyImportedModules.erase(import.module.importedModule);
explicitlyImportedModules.erase(import.module.importedModule);

// Consider the current module "explicit".
explictlyImportedModules.insert(SF.getParentModule());
explicitlyImportedModules.insert(SF.getParentModule());
}

for (auto &Request: Lookup.RequestedCachedResults) {
Expand Down Expand Up @@ -1338,7 +1338,7 @@ void swift::ide::deliverCompletionResults(
auto TheModuleName = TheModule->getName();
if (Request.IncludeModuleQualifier &&
(!Lookup.isHiddenModuleName(TheModuleName) ||
explictlyImportedModules.contains(TheModule)) &&
explicitlyImportedModules.contains(TheModule)) &&
seenModuleNames.insert(TheModuleName).second)
Lookup.addModuleName(TheModule);
}
Expand Down Expand Up @@ -1654,7 +1654,7 @@ void CodeCompletionCallbacksImpl::doneParsing() {
/// We set the type of ParsedExpr explicitly above. But we don't want an
/// unresolved type in our AST when we type check again for operator
/// completions. Remove the type of the ParsedExpr and see if we can come up
/// with something more useful based on the the full sequence expression.
/// with something more useful based on the full sequence expression.
if (ParsedExpr->getType()->is<UnresolvedType>()) {
ParsedExpr->setType(nullptr);
}
Expand Down Expand Up @@ -1945,7 +1945,7 @@ void CodeCompletionCallbacksImpl::doneParsing() {
break;
}

case CompletionKind::PlatformConditon: {
case CompletionKind::PlatformCondition: {
addPlatformConditions(CompletionContext.getResultSink());
addConditionalCompilationFlags(CurDeclContext->getASTContext(),
CompletionContext.getResultSink());
Expand All @@ -1958,7 +1958,7 @@ void CodeCompletionCallbacksImpl::doneParsing() {
break;
}
case CompletionKind::PrecedenceGroup:
Lookup.getPrecedenceGroupCompletions(SyntxKind);
Lookup.getPrecedenceGroupCompletions(SyntaxKind_);
break;
case CompletionKind::StmtLabel: {
SourceLoc Loc = P.Context.SourceMgr.getCodeCompletionLoc();
Expand Down
Loading