@@ -59,6 +59,16 @@ LLVM_YAML_IS_SEQUENCE_VECTOR(clang::format::FormatStyle::RawStringFormat)
5959
6060namespace llvm {
6161namespace yaml {
62+ template <>
63+ struct ScalarEnumerationTraits <FormatStyle::BreakBeforeNoexceptSpecifierStyle> {
64+ static void enumeration (IO &IO,
65+ FormatStyle::BreakBeforeNoexceptSpecifierStyle &Value) {
66+ IO.enumCase (Value, " Never" , FormatStyle::BBNSS_Never);
67+ IO.enumCase (Value, " OnlyWithParen" , FormatStyle::BBNSS_OnlyWithParen);
68+ IO.enumCase (Value, " Always" , FormatStyle::BBNSS_Always);
69+ }
70+ };
71+
6272template <> struct MappingTraits <FormatStyle::AlignConsecutiveStyle> {
6373 static void enumInput (IO &IO, FormatStyle::AlignConsecutiveStyle &Value) {
6474 IO.enumCase (Value, " None" ,
@@ -260,6 +270,7 @@ struct ScalarEnumerationTraits<FormatStyle::BreakBeforeInlineASMColonStyle> {
260270 IO.enumCase (Value, " Always" , FormatStyle::BBIAS_Always);
261271 }
262272};
273+
263274template <>
264275struct ScalarEnumerationTraits <FormatStyle::BreakConstructorInitializersStyle> {
265276 static void
@@ -904,6 +915,8 @@ template <> struct MappingTraits<FormatStyle> {
904915 Style.AllowAllArgumentsOnNextLine );
905916 IO.mapOptional (" AllowAllParametersOfDeclarationOnNextLine" ,
906917 Style.AllowAllParametersOfDeclarationOnNextLine );
918+ IO.mapOptional (" AllowBreakBeforeNoexceptSpecifier" ,
919+ Style.AllowBreakBeforeNoexceptSpecifier );
907920 IO.mapOptional (" AllowShortBlocksOnASingleLine" ,
908921 Style.AllowShortBlocksOnASingleLine );
909922 IO.mapOptional (" AllowShortCaseLabelsOnASingleLine" ,
@@ -1448,6 +1461,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) {
14481461 LLVMStyle.BreakBeforeBraces = FormatStyle::BS_Attach;
14491462 LLVMStyle.BreakBeforeConceptDeclarations = FormatStyle::BBCDS_Always;
14501463 LLVMStyle.BreakBeforeInlineASMColon = FormatStyle::BBIAS_OnlyMultiline;
1464+ LLVMStyle.AllowBreakBeforeNoexceptSpecifier = FormatStyle::BBNSS_Never;
14511465 LLVMStyle.BreakBeforeTernaryOperators = true ;
14521466 LLVMStyle.BreakConstructorInitializers = FormatStyle::BCIS_BeforeColon;
14531467 LLVMStyle.BreakInheritanceList = FormatStyle::BILS_BeforeColon;
0 commit comments