mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Sema] Diagnose unsound pointer conversions
Diagnose ephemeral conversions that are passed to @_nonEphemeral parameters. Currently, this defaults to a warning with a frontend flag to upgrade to an error. Hopefully this will become an error by default in a future language version.
This commit is contained in:
@@ -276,7 +276,10 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
|
||||
Opts.EnableOperatorDesignatedTypes |=
|
||||
Args.hasArg(OPT_enable_operator_designated_types);
|
||||
|
||||
|
||||
Opts.DiagnoseInvalidEphemeralnessAsError |=
|
||||
Args.hasArg(OPT_diagnose_invalid_ephemeralness_as_error);
|
||||
|
||||
// Always enable operator designated types for the standard library.
|
||||
Opts.EnableOperatorDesignatedTypes |= FrontendOpts.ParseStdlib;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user