Skip to content

Commit d6cf6f9

Browse files
committed
spelling: unknown
Signed-off-by: Josh Soref <[email protected]>
1 parent 7309361 commit d6cf6f9

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

include/swift/ClangImporter/CXXMethodBridging.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,67 +8,67 @@
88
#include <string>
99
namespace swift {
1010
struct CXXMethodBridging {
11-
enum class Kind { unkown, getter, setter, subscript };
11+
enum class Kind { unknown, getter, setter, subscript };
1212

13-
enum class NameKind { unkown, snake, lower, camel, title };
13+
enum class NameKind { unknown, snake, lower, camel, title };
1414

1515
CXXMethodBridging(const clang::CXXMethodDecl *method) : method(method) {}
1616

1717
Kind classify() {
1818
if (nameIsBlacklist())
19-
return Kind::unkown;
19+
return Kind::unknown;
2020

2121
// this should be handled as snake case. See: rdar://89453010
2222
// case. In the future we could
2323
// import these too, though.
2424
auto nameKind = classifyNameKind();
2525
if (nameKind != NameKind::title && nameKind != NameKind::camel &&
2626
nameKind != NameKind::lower)
27-
return Kind::unkown;
27+
return Kind::unknown;
2828

2929
if (getClangName().startswith_insensitive("set")) {
3030
// Setters only have one parameter.
3131
if (method->getNumParams() != 1)
32-
return Kind::unkown;
32+
return Kind::unknown;
3333

3434
// rdar://89453106 (We need to handle imported properties that return a
3535
// reference)
3636
if (method->getParamDecl(0)->getType()->isReferenceType())
37-
return Kind::unkown;
37+
return Kind::unknown;
3838

3939
return Kind::setter;
4040
}
4141

4242
// Getters and subscripts cannot return void.
4343
if (method->getReturnType()->isVoidType())
44-
return Kind::unkown;
44+
return Kind::unknown;
4545

4646
if (getClangName().startswith_insensitive("get")) {
4747
// Getters cannot take arguments.
4848
if (method->getNumParams() != 0)
49-
return Kind::unkown;
49+
return Kind::unknown;
5050

5151
// rdar://89453106 (We need to handle imported properties that return a
5252
// reference)
5353
if (method->getReturnType()->isReferenceType())
54-
return Kind::unkown;
54+
return Kind::unknown;
5555

5656
return Kind::getter;
5757
}
5858

5959
// rdar://89453187 (Add subscripts clarification to CXXMethod Bridging to
6060
// clean up importDecl)
61-
return Kind::unkown;
61+
return Kind::unknown;
6262
}
6363

6464
NameKind classifyNameKind() {
6565
bool allLower = llvm::all_of(getClangName(), islower);
6666

6767
if (getClangName().empty())
68-
return NameKind::unkown;
68+
return NameKind::unknown;
6969

7070
if (getClangName().contains('_'))
71-
return allLower ? NameKind::snake : NameKind::unkown;
71+
return allLower ? NameKind::snake : NameKind::unknown;
7272

7373
if (allLower)
7474
return NameKind::lower;

0 commit comments

Comments
 (0)