Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

Commit

Permalink
[Swift] Add support for call declarations.
Browse files Browse the repository at this point in the history
Add Clang support for `call` declarations in Swift.
  • Loading branch information
dan-zheng committed Mar 27, 2019
1 parent f6e68ee commit b6e2bb6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/clang/Index/IndexSymbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ enum class SymbolSubKind : uint8_t {
SwiftPostfixOperator,
SwiftInfixOperator,

SwiftCall,
SwiftSubscript,
SwiftAssociatedType,
SwiftGenericTypeParam,
Expand Down
1 change: 1 addition & 0 deletions include/indexstore/indexstore.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ typedef enum {
INDEXSTORE_SYMBOL_SUBKIND_SWIFTGENERICTYPEPARAM = 1013,
INDEXSTORE_SYMBOL_SUBKIND_SWIFTACCESSORREAD = 1014,
INDEXSTORE_SYMBOL_SUBKIND_SWIFTACCESSORMODIFY = 1015,
INDEXSTORE_SYMBOL_SUBKIND_SWIFTCALL = 1016,
} indexstore_symbol_subkind_t;

typedef enum {
Expand Down
2 changes: 2 additions & 0 deletions lib/Index/IndexDataStoreUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ indexstore_symbol_subkind_t index::getIndexStoreSubKind(SymbolSubKind K) {
return INDEXSTORE_SYMBOL_SUBKIND_SWIFTINFIXOPERATOR;
case SymbolSubKind::SwiftSubscript:
return INDEXSTORE_SYMBOL_SUBKIND_SWIFTSUBSCRIPT;
case SymbolSubKind::SwiftCall:
return INDEXSTORE_SYMBOL_SUBKIND_SWIFTCALL;
case SymbolSubKind::SwiftAssociatedType:
return INDEXSTORE_SYMBOL_SUBKIND_SWIFTASSOCIATEDTYPE;
case SymbolSubKind::SwiftGenericTypeParam:
Expand Down
1 change: 1 addition & 0 deletions lib/Index/IndexSymbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ StringRef index::getSymbolSubKindString(SymbolSubKind K) {
case SymbolSubKind::SwiftPrefixOperator: return "prefix-operator";
case SymbolSubKind::SwiftPostfixOperator: return "postfix-operator";
case SymbolSubKind::SwiftInfixOperator: return "infix-operator";
case SymbolSubKind::SwiftCall: return "call";
case SymbolSubKind::SwiftSubscript: return "subscript";
case SymbolSubKind::SwiftAssociatedType: return "associated-type";
case SymbolSubKind::SwiftGenericTypeParam: return "generic-type-param";
Expand Down

0 comments on commit b6e2bb6

Please sign in to comment.