Add -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=,
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 22 Feb 2013 01:59:51 +0000 (01:59 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 22 Feb 2013 01:59:51 +0000 (01:59 +0000)
commitb3a145293dc800bb5bfc8031892713227e686e7e
tree282c8af52c67dbce5e39e5787bd8bfeb15806456
parent5772f82d1eaf8284fe2f2d637282091a484c13a4
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
clang/docs/UsersManual.rst
clang/include/clang/Basic/DiagnosticParseKinds.td
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Driver/CC1Options.td
clang/include/clang/Driver/Options.td
clang/lib/Driver/Tools.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Parse/Parser.cpp
clang/lib/Parse/RAIIObjectsForParser.h
clang/test/Parser/parser_overflow.c