Skip to content

Commit ec6acfd

Browse files
committed
Frontend: Reinstate suppression of warnings during interface type-checking.
We're not ready to start emitting warnings when type-checking modules from interface. It is causing performance regressions and spurious diagnostics to be emitted. Reverts a small part of swiftlang#80360. Resolves rdar://148257136.
1 parent 431138b commit ec6acfd

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

lib/Frontend/ModuleInterfaceLoader.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1741,13 +1741,11 @@ void InterfaceSubContextDelegateImpl::inheritOptionsForBuildingInterface(
17411741
genericSubInvocation.setRuntimeResourcePath(SearchPathOpts.RuntimeResourcePath);
17421742
}
17431743

1744-
// Inhibit warnings from the genericSubInvocation since we are assuming the user
1745-
// is not in a position to address them. (Unless we're verifying, in which
1746-
// case they might.)
1747-
if (requestedAction != FrontendOptions::ActionType::Typecheck) {
1748-
genericSubInvocation.getDiagnosticOptions().SuppressWarnings = true;
1749-
GenericArgs.push_back("-suppress-warnings");
1750-
}
1744+
// Inhibit warnings from the genericSubInvocation since we are assuming the
1745+
// user is not in a position to address them.
1746+
genericSubInvocation.getDiagnosticOptions().SuppressWarnings = true;
1747+
GenericArgs.push_back("-suppress-warnings");
1748+
17511749
// Inherit the parent invocation's setting on whether to suppress remarks
17521750
if (suppressRemarks) {
17531751
genericSubInvocation.getDiagnosticOptions().SuppressRemarks = true;

test/ModuleInterface/has_storage_attr_bad.swiftinterface

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)