diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index b78c0229de489..023c365049735 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -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 ------------------------- diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index cfd9e595c5517..c66e035a259b3 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -7959,7 +7959,7 @@ def fapply_global_visibility_to_externs : Flag<["-"], "fapply-global-visibility- MarshallingInfoFlag>; def fbracket_depth : Separate<["-"], "fbracket-depth">, HelpText<"Maximum nesting level for parentheses, brackets, and braces">, - MarshallingInfoInt, "256">; + MarshallingInfoInt, "2048">; defm const_strings : BoolOption<"f", "const-strings", LangOpts<"ConstStrings">, DefaultFalse, PosFlag, diff --git a/clang/test/Parser/parser_overflow.c b/clang/test/Parser/parser_overflow.c index 9514e808550a4..53c79bc06d993 100644 --- a/clang/test/Parser/parser_overflow.c +++ b/clang/test/Parser/parser_overflow.c @@ -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 @@ -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