[SourceKit/CursorInfo] Add constructor to call results

Cursor info for a constructor would previously give the cursor info for
the containing type only. It now also adds cursor info for the
constructor itself in a "secondary_symbols" field.

Refactor `passCursorInfoForDecl` to use a single allocator rather than
keeping track of positions in a buffer and assigning everything at the
end of the function.

Refactor the various available refactoring gathering functions to take a
SmallVectorImpl and to not copy strings where they don't need to.

Resolves rdar://75385556
This commit is contained in:
Ben Barham
2021-03-20 09:32:10 +10:00
parent 8f52c2683f
commit 3ea9bed415
21 changed files with 861 additions and 883 deletions

View File

@@ -113,7 +113,6 @@ UID_KEYS = [
KEY('Deprecated', 'key.deprecated'),
KEY('Obsoleted', 'key.obsoleted'),
KEY('RemoveCache', 'key.removecache'),
KEY('TypeInterface', 'key.typeinterface'),
KEY('TypeUsr', 'key.typeusr'),
KEY('ContainerTypeUsr', 'key.containertypeusr'),
KEY('ModuleGroups', 'key.modulegroups'),
@@ -190,6 +189,7 @@ UID_KEYS = [
KEY('CompileOperation', 'key.compile_operation'),
KEY('EffectiveAccess', 'key.effective_access'),
KEY('DeclarationLang', 'key.decl_lang'),
KEY('SecondarySymbols', 'key.secondary_symbols'),
]