File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed
tools/SourceKit/lib/SwiftLang Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -1590,20 +1590,10 @@ ImmutableTextSnapshotRef SwiftEditorDocument::replaceText(
1590
1590
if (Length != 0 || Buf->getBufferSize() != 0) {
1591
1591
updateSemaInfo();
1592
1592
1593
- if (auto Invok = Impl.SemanticInfo->getInvocation()) {
1594
- // Update semantic info for open editor documents of the same module.
1595
- // FIXME: Detect edits that don't affect other files, e.g. whitespace,
1596
- // comments, inside a function body, etc.
1597
- CompilerInvocation CI;
1598
- Invok->applyTo(CI);
1599
- auto &EditorDocs = Impl.LangSupport.getEditorDocuments();
1600
- for (auto &Input : CI.getInputFilenames()) {
1601
- if (auto EditorDoc = EditorDocs.findByPath(Input)) {
1602
- if (EditorDoc.get() != this)
1603
- EditorDoc->updateSemaInfo();
1604
- }
1605
- }
1606
- }
1593
+ // FIXME: we should also update any "interesting" ASTs that depend on this
1594
+ // document here, e.g. any ASTs for files visible in an editor. However,
1595
+ // because our API conflates this with any file with unsaved changes we do
1596
+ // not update all open documents, since there could be too many of them.
1607
1597
}
1608
1598
}
1609
1599
You can’t perform that action at this time.
0 commit comments