Merge pull request #85446 from xymus/serial-xref-check

Serialization: Error on leaked cross-references to `@_implementationOnly` dependencies
This commit is contained in:
Alexis Laferrière
2025-11-12 10:42:58 -08:00
committed by GitHub
14 changed files with 246 additions and 35 deletions

View File

@@ -1897,6 +1897,10 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.enableFeature(Feature::NoExplicitNonIsolated);
}
if (Opts.hasFeature(Feature::CheckImplementationOnlyStrict) &&
!::getenv("SWIFT_DISABLE_IMPLICIT_CHECK_IMPLEMENTATION_ONLY"))
Opts.enableFeature(Feature::CheckImplementationOnly);
#if !defined(NDEBUG) && SWIFT_ENABLE_EXPERIMENTAL_PARSER_VALIDATION
/// Enable round trip parsing via the new swift parser unless it is disabled
/// explicitly. The new Swift parser can have mismatches with C++ parser -