Skip to content

Commit 3c8ec81

Browse files
authored
Spelling index (#42543)
* spelling: different Signed-off-by: Josh Soref <[email protected]> * spelling: implicit Signed-off-by: Josh Soref <[email protected]> * spelling: overridden Signed-off-by: Josh Soref <[email protected]> * spelling: parameter Signed-off-by: Josh Soref <[email protected]> * spelling: treat Signed-off-by: Josh Soref <[email protected]> * spelling: unknown Signed-off-by: Josh Soref <[email protected]> Co-authored-by: Josh Soref <[email protected]>
1 parent 203b9ce commit 3c8ec81

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

lib/Index/Index.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ class IndexSwiftASTWalker : public SourceEntityWalker {
740740
/// Extensions redeclare all generic parameters of their extended type to add
741741
/// their additional restrictions. There are two issues with this model for
742742
/// indexing:
743-
/// - The generic paramter declarations of the extension are implicit so we
743+
/// - The generic parameter declarations of the extension are implicit so we
744744
/// wouldn't report them in the index. Any usage of the generic param in
745745
/// the extension references this implicit declaration so we don't include
746746
/// it in the index either.
@@ -749,7 +749,7 @@ class IndexSwiftASTWalker : public SourceEntityWalker {
749749
/// declaration of the param in the extended type.
750750
///
751751
/// To fix these issues, we replace the reference to the implicit generic
752-
/// parameter defined in the extension by a reference to the generic paramter
752+
/// parameter defined in the extension by a reference to the generic parameter
753753
/// defined in the extended type.
754754
///
755755
/// \returns the canonicalized replaced generic param decl if it can be found
@@ -759,7 +759,7 @@ class IndexSwiftASTWalker : public SourceEntityWalker {
759759
auto Extension = dyn_cast_or_null<ExtensionDecl>(
760760
GenParam->getDeclContext()->getAsDecl());
761761
if (!Extension) {
762-
// We are not referencing a generic paramter defined in an extension.
762+
// We are not referencing a generic parameter defined in an extension.
763763
// Nothing to do.
764764
return GenParam;
765765
}
@@ -1241,8 +1241,8 @@ bool IndexSwiftASTWalker::startEntityDecl(ValueDecl *D) {
12411241
return false;
12421242
}
12431243

1244-
for (auto Overriden: collectAllOverriddenDecls(D, /*IncludeProtocolReqs=*/false)) {
1245-
addRelation(Info, (SymbolRoleSet) SymbolRole::RelationOverrideOf, Overriden);
1244+
for (auto Overridden: collectAllOverriddenDecls(D, /*IncludeProtocolReqs=*/false)) {
1245+
addRelation(Info, (SymbolRoleSet) SymbolRole::RelationOverrideOf, Overridden);
12461246
}
12471247

12481248
if (auto Parent = getParentDecl()) {

lib/Index/IndexSymbol.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static bool isUnitTestCase(const ClassDecl *D) {
3030
return false;
3131

3232
return D->walkSuperclasses([D](ClassDecl *SuperD) {
33-
if (SuperD != D && // Do not treate XCTestCase itself as a test.
33+
if (SuperD != D && // Do not treat XCTestCase itself as a test.
3434
SuperD->getNameStr() == "XCTestCase")
3535
return TypeWalker::Action::Stop; // Found test; stop and return true.
3636
return TypeWalker::Action::Continue;

test/Index/Store/unit-custom-output-path-driver.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
// INDEX_WITH_NEGATIVE-NOT: second_out.o
7878
// INDEX_WITH_NEGATIVE-NOT: second_different.o
7979
//
80-
// Run with a diferent -index-unit-output-path
80+
// Run with a different -index-unit-output-path
8181
// RUN: echo '{ ' > %/t/outputmap-different2.json
8282
// RUN: echo ' "%/t/main.swift":{ ' >> %/t/outputmap-different2.json
8383
// RUN: echo ' "object": "%/t/main_different.o", ' >> %/t/outputmap-different2.json

test/Index/Store/unit-custom-output-path.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
// INDEX_WITH_NEGATIVE-NOT: main_out.o
4444
// INDEX_WITH_NEGATIVE-NOT: different.o
4545
//
46-
// Run with a diferent -index-unit-output-path
46+
// Run with a different -index-unit-output-path
4747
// RUN: %target-swift-frontend -typecheck -parse-stdlib \
4848
// RUN: -module-name mod_name -index-store-path %t/idx_with \
4949
// RUN: -primary-file %t/main.swift %t/second.swift \

test/Index/index_generic_params.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ extension Wrapper2.NonGenericWrapped where Wrapper2Param: P1 {
8080
func bar(x: Wrapper2Param.Assoc) {}
8181
}
8282

83-
// MARK: - Test extending an unkown type
83+
// MARK: - Test extending an unknown type
8484

8585
// Check that we don't crash. We don't expect the generic params to show up in the index.
8686
extension MyUnknownType where Wrapper2Param: P1 {

0 commit comments

Comments
 (0)