C++1y: Add a step limit to constexpr evaluation, to catch runaway loops.
llvm-svn: 181388
This commit is contained in:
@@ -1251,6 +1251,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
|
||||
Diags);
|
||||
Opts.ConstexprCallDepth = Args.getLastArgIntValue(OPT_fconstexpr_depth, 512,
|
||||
Diags);
|
||||
Opts.ConstexprStepLimit = Args.getLastArgIntValue(OPT_fconstexpr_steps,
|
||||
1048576, Diags);
|
||||
Opts.BracketDepth = Args.getLastArgIntValue(OPT_fbracket_depth, 256, Diags);
|
||||
Opts.DelayedTemplateParsing = Args.hasArg(OPT_fdelayed_template_parsing);
|
||||
Opts.NumLargeByValueCopy = Args.getLastArgIntValue(OPT_Wlarge_by_value_copy_EQ,
|
||||
|
||||
Reference in New Issue
Block a user