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.
8 lines
445 B
Swift
8 lines
445 B
Swift
// RUN: %target-swift-frontend -compile-module-from-interface %S/Inputs/suppress-warnings/SuppressWarnings.swiftinterface -o /dev/null -module-name SuppressWarnings 2>&1 | %FileCheck %s --allow-empty
|
|
// RUN: %target-swift-frontend -typecheck %s -I %S/Inputs/suppress-warnings/ 2>&1 | %FileCheck %s --allow-empty
|
|
|
|
// Warnings should not be emitted when compiling SuppressWarnings from its interface
|
|
// CHECK-NOT: warning
|
|
|
|
import SuppressWarnings
|