Add -enable-experimental-lifetime-dependence-inference option

Until stdlib can be built with noncopyable generics, stdlib types
can appear as ~Escapable and ~Copyable, leading to invalid inference.

Use a flag to test implicit lifetime dependence
This commit is contained in:
Meghana Gupta
2024-01-30 23:09:59 -08:00
parent 350cdd3285
commit 968f69cf66
3 changed files with 16 additions and 0 deletions

View File

@@ -1346,6 +1346,11 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
if (Args.hasArg(OPT_disable_experimental_associated_type_inference))
Opts.EnableExperimentalAssociatedTypeInference = false;
if (Args.hasArg(OPT_enable_experimental_lifetime_dependence_inference))
Opts.EnableExperimentalLifetimeDependenceInference = true;
if (Args.hasArg(OPT_disable_experimental_lifetime_dependence_inference))
Opts.EnableExperimentalLifetimeDependenceInference = false;
Opts.DumpTypeWitnessSystems = Args.hasArg(OPT_dump_type_witness_systems);
for (auto &block: FrontendOpts.BlocklistConfigFilePaths)