From 9e738cc9d4b4655c44dadeb22f3a314daf43b995 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 22 Feb 2013 01:59:51 +0000 Subject: Add -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=, to control the check for the C 5.2.4.1 / C++ [implimits] restriction on nesting levels for parentheses, brackets and braces. Some code with heavy macro use exceeds the default limit of 256, but we don't want to increase it generally to avoid stack overflow on stack-constrained systems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175855 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CompilerInvocation.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/Frontend/CompilerInvocation.cpp') diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 05e079470a..5b9f5d74fe 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -1221,6 +1221,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Diags); Opts.ConstexprCallDepth = Args.getLastArgIntValue(OPT_fconstexpr_depth, 512, 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, 0, Diags); -- cgit v1.2.3-18-g5258