diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-02-22 01:59:51 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-02-22 01:59:51 +0000 |
commit | b3a145293dc800bb5bfc8031892713227e686e7e (patch) | |
tree | 282c8af52c67dbce5e39e5787bd8bfeb15806456 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 5772f82d1eaf8284fe2f2d637282091a484c13a4 (diff) | |
download | bcm5719-llvm-b3a145293dc800bb5bfc8031892713227e686e7e.tar.gz bcm5719-llvm-b3a145293dc800bb5bfc8031892713227e686e7e.zip |
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.
llvm-svn: 175855
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 05e079470ae..5b9f5d74fef 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/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); |