[sourcekitd] Fix potential race in semantic highlighting tests

In order to make range-shifting for semantic highlighting testable,
disable returning semantic information during an "open" request. This
has no real value anyway, since it only happens very rarely, and it
makes testing range shifting impossible to do deterministically.

rdar://problem/66386179
This commit is contained in:
Ben Langmuir
2020-07-31 13:51:08 -07:00
parent 8e352b8006
commit 756ef4063c
3 changed files with 19 additions and 23 deletions

View File

@@ -109,7 +109,7 @@ public:
void parse(ImmutableTextSnapshotRef Snapshot, SwiftLangSupport &Lang,
bool BuildSyntaxTree,
swift::SyntaxParsingCache *SyntaxCache = nullptr);
void readSyntaxInfo(EditorConsumer &consumer);
void readSyntaxInfo(EditorConsumer &consumer, bool ReportDiags);
void readSemanticInfo(ImmutableTextSnapshotRef Snapshot,
EditorConsumer& Consumer);