mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Diagnostics are suppressed when parsing swiftinterface files, since the warnings emitted from compiling the swiftinterface of a dependency would just be a nuisance. It follows that warnings generated when parsing the arguments in a swiftinterface file should also be suppressed, but that wasn't happening because the diagnostic engine of the main compile was used for parsing. Pass the diagnostic engine of the compiler subinstance instead, and proactively suppress warnings before parsing begins. Resolves rdar://142814164.
9 lines
220 B
Plaintext
9 lines
220 B
Plaintext
// swift-interface-format-version: 1.0
|
|
// swift-module-flags: -module-name SuppressWarnings -swift-version 6 -enable-upcoming-feature ConciseMagicFile
|
|
|
|
import Swift
|
|
|
|
@inlinable public func neverMutated() {
|
|
var x = 1
|
|
}
|