Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ Deprecated Compiler Flags
Modified Compiler Flags
-----------------------

- The compiler flag `-fbracket-depth` default value is increased from 256 to 2048.

Removed Compiler Flags
-------------------------

Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -7959,7 +7959,7 @@ def fapply_global_visibility_to_externs : Flag<["-"], "fapply-global-visibility-
MarshallingInfoFlag<LangOpts<"SetVisibilityForExternDecls">>;
def fbracket_depth : Separate<["-"], "fbracket-depth">,
HelpText<"Maximum nesting level for parentheses, brackets, and braces">,
MarshallingInfoInt<LangOpts<"BracketDepth">, "256">;
MarshallingInfoInt<LangOpts<"BracketDepth">, "2048">;
defm const_strings : BoolOption<"f", "const-strings",
LangOpts<"ConstStrings">, DefaultFalse,
PosFlag<SetTrue, [], [ClangOption, CC1Option], "Use">,
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Parser/parser_overflow.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: not %clang_cc1 %s -fsyntax-only -DHUGE 2>&1 | FileCheck %s
// RUN: not %clang_cc1 %s -fsyntax-only 2>&1 | FileCheck %s
// RUN: %clang_cc1 %s -fsyntax-only
// RUN: not %clang_cc1 %s -fsyntax-only -fbracket-depth 299 2>&1 | FileCheck %s
// RUN: %clang_cc1 %s -fsyntax-only -fbracket-depth 300
// RUN: not %clang %s -fsyntax-only -fbracket-depth=299 2>&1 | FileCheck %s
Expand All @@ -15,5 +15,5 @@ void foo(void) {
#endif
}

// CHECK: fatal error: bracket nesting level exceeded maximum of {{256|299}}
// CHECK: fatal error: bracket nesting level exceeded maximum of {{2048|299}}
// CHECK: note: use -fbracket-depth=N to increase maximum nesting level