mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Sema: Downgrade potentially unavailable enum cases to a warning in module interfaces
There are two pieces here: - A -warn-on-potentially-unavailable-enum-case flag is passed down by the driver when *producing* a swiftinterface - When *consuming* a swiftinterface, also enable this behavior Part of rdar://problem/78306593.
This commit is contained in:
@@ -457,6 +457,8 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
= A->getOption().matches(OPT_enable_conformance_availability_errors);
|
||||
}
|
||||
|
||||
Opts.WarnOnPotentiallyUnavailableEnumCase |=
|
||||
Args.hasArg(OPT_warn_on_potentially_unavailable_enum_case);
|
||||
if (auto A = Args.getLastArg(OPT_enable_access_control,
|
||||
OPT_disable_access_control)) {
|
||||
Opts.EnableAccessControl
|
||||
|
||||
Reference in New Issue
Block a user