mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When indexing an empty Swift file, we get a unit file that doesn’t have any record dependency declared on the source file. Because of this, we always assume that the empty file has an out of date index store entry and re-index it on project open. Write empty record files to fix this. rdar://128711594
6 lines
318 B
Swift
6 lines
318 B
Swift
// RUN: rm -rf %t
|
|
// RUN: %target-swift-frontend -index-store-path %t/idx -o %t/file.o -typecheck -primary-file %s
|
|
// RUN: %target-swift-frontend -index-store-path %t/idx -o %t/file.o -typecheck %s
|
|
// RUN: c-index-test core -print-unit %t/idx | %FileCheck %s
|
|
// CHECK: Record | user | {{.*}}{{/|\\}}record-empty.swift
|