summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/RAIIObjectsForParser.h
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-02-22 01:59:51 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-02-22 01:59:51 +0000
commitb3a145293dc800bb5bfc8031892713227e686e7e (patch)
tree282c8af52c67dbce5e39e5787bd8bfeb15806456 /clang/lib/Parse/RAIIObjectsForParser.h
parent5772f82d1eaf8284fe2f2d637282091a484c13a4 (diff)
downloadbcm5719-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/Parse/RAIIObjectsForParser.h')
-rw-r--r--clang/lib/Parse/RAIIObjectsForParser.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/RAIIObjectsForParser.h b/clang/lib/Parse/RAIIObjectsForParser.h
index 060fd206cd7..213950a6db9 100644
--- a/clang/lib/Parse/RAIIObjectsForParser.h
+++ b/clang/lib/Parse/RAIIObjectsForParser.h
@@ -407,7 +407,7 @@ namespace clang {
if (!P.Tok.is(Kind))
return true;
- if (getDepth() < MaxDepth) {
+ if (getDepth() < P.getLangOpts().BracketDepth) {
LOpen = (P.*Consumer)();
return false;
}
OpenPOWER on IntegriCloud