propagate vfs to more places, remove vfs arg

Propagates the VFS to the SemanticInfo that gets used when then
original editor.open is syntactic only.

Removes unnecessary filesystem arg (get filesystem from class field
instead).

Adds test for the VFS being propagated into the SemanticInfo.

Refactors test/SourceKit/CursorInfo/injected_vfs.swift to use
-print-raw-response for all its tests, for consistency.
This commit is contained in:
Marc Rasi
2019-07-16 11:39:00 -07:00
parent 7124235540
commit 3b44b27b30
3 changed files with 57 additions and 38 deletions

View File

@@ -86,13 +86,13 @@ class SwiftEditorDocument :
public:
SwiftEditorDocument(StringRef FilePath, SwiftLangSupport &LangSupport,
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> fileSystem,
swift::ide::CodeFormatOptions Options = swift::ide::CodeFormatOptions());
~SwiftEditorDocument();
ImmutableTextSnapshotRef
initializeText(llvm::MemoryBuffer *Buf, ArrayRef<const char *> Args,
bool ProvideSemanticInfo,
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> FileSystem);
bool ProvideSemanticInfo);
ImmutableTextSnapshotRef replaceText(unsigned Offset, unsigned Length,
llvm::MemoryBuffer *Buf,
bool ProvideSemanticInfo,