mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] If diagnostics are 'stale' for a particular snapshot then ignore them and only return the syntactic parser diagnostics (#10388)
This makes sure that diagnostics returned for a particular state of source buffer are consistent and accurate. rdar://32769873
This commit is contained in:
committed by
GitHub
parent
531c2e8868
commit
0cfc56ec04
@@ -18,8 +18,9 @@ using namespace SourceKit;
|
||||
|
||||
SourceKit::Context::Context(StringRef RuntimeLibPath,
|
||||
llvm::function_ref<std::unique_ptr<LangSupport>(Context &)>
|
||||
LangSupportFactoryFn) : RuntimeLibPath(RuntimeLibPath),
|
||||
NotificationCtr(new NotificationCenter()) {
|
||||
LangSupportFactoryFn,
|
||||
bool shouldDispatchNotificationsOnMain) : RuntimeLibPath(RuntimeLibPath),
|
||||
NotificationCtr(new NotificationCenter(shouldDispatchNotificationsOnMain)) {
|
||||
// Should be called last after everything is initialized.
|
||||
SwiftLang = LangSupportFactoryFn(*this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user