[Concurrency] Put the flow-sensitive concurrent captures check behind a flag

We're not quite ready to commit to the flow-sensitive check that would
allow a concurrent function to read from a mutable local capture so
long as the captured variable wasn't changed after the point of
capture. Put it behind a flag and implement the more restrictive rule
(no access to mutable local captures in concurrent code). We can relax
it later.
This commit is contained in:
Doug Gregor
2021-02-11 11:43:07 -08:00
parent 5af310a5c4
commit 6dd1c4768a
11 changed files with 40 additions and 19 deletions

View File

@@ -387,6 +387,8 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Args.hasArg(OPT_enable_experimental_concurrency);
Opts.EnableExperimentalConcurrentValueChecking |=
Args.hasArg(OPT_enable_experimental_concurrent_value_checking);
Opts.EnableExperimentalFlowSensitiveConcurrentCaptures |=
Args.hasArg(OPT_enable_experimental_flow_sensitive_concurrent_captures);
Opts.DisableImplicitConcurrencyModuleImport |=
Args.hasArg(OPT_disable_implicit_concurrency_module_import);