Skip to content

Commit 58f856e

Browse files
committed
Reorder
1 parent 6475c9d commit 58f856e

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

clang/include/clang/Format/Format.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2676,19 +2676,6 @@ struct FormatStyle {
26762676
/// \version 3.7
26772677
bool ExperimentalAutoDetectBinPacking;
26782678

2679-
/// If ``true``, clang-format will indent the body of an ``export { ... }``
2680-
/// block. This doesn't affect the formatting of anything else related to
2681-
/// exported declarations.
2682-
/// \code
2683-
/// true: false:
2684-
/// export { vs. export {
2685-
/// void foo(); void foo();
2686-
/// void bar(); void bar();
2687-
/// } }
2688-
/// \endcode
2689-
/// \version 20
2690-
bool IndentExportBlock;
2691-
26922679
/// If ``true``, clang-format adds missing namespace end comments for
26932680
/// namespaces and fixes invalid existing ones. This doesn't affect short
26942681
/// namespaces, which are controlled by ``ShortNamespaceLines``.
@@ -2832,6 +2819,19 @@ struct FormatStyle {
28322819
/// \version 10
28332820
bool IndentGotoLabels;
28342821

2822+
/// If ``true``, clang-format will indent the body of an ``export { ... }``
2823+
/// block. This doesn't affect the formatting of anything else related to
2824+
/// exported declarations.
2825+
/// \code
2826+
/// true: false:
2827+
/// export { vs. export {
2828+
/// void foo(); void foo();
2829+
/// void bar(); void bar();
2830+
/// } }
2831+
/// \endcode
2832+
/// \version 20
2833+
bool IndentExportBlock;
2834+
28352835
/// Indents extern blocks
28362836
enum IndentExternBlockStyle : int8_t {
28372837
/// Backwards compatible with AfterExternBlock's indenting.
@@ -5267,7 +5267,6 @@ struct FormatStyle {
52675267
EmptyLineBeforeAccessModifier == R.EmptyLineBeforeAccessModifier &&
52685268
ExperimentalAutoDetectBinPacking ==
52695269
R.ExperimentalAutoDetectBinPacking &&
5270-
IndentExportBlock == R.IndentExportBlock &&
52715270
FixNamespaceComments == R.FixNamespaceComments &&
52725271
ForEachMacros == R.ForEachMacros &&
52735272
IncludeStyle.IncludeBlocks == R.IncludeStyle.IncludeBlocks &&
@@ -5280,6 +5279,7 @@ struct FormatStyle {
52805279
IndentAccessModifiers == R.IndentAccessModifiers &&
52815280
IndentCaseBlocks == R.IndentCaseBlocks &&
52825281
IndentCaseLabels == R.IndentCaseLabels &&
5282+
IndentExportBlock == R.IndentExportBlock &&
52835283
IndentExternBlock == R.IndentExternBlock &&
52845284
IndentGotoLabels == R.IndentGotoLabels &&
52855285
IndentPPDirectives == R.IndentPPDirectives &&

clang/lib/Format/Format.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,6 @@ template <> struct MappingTraits<FormatStyle> {
10401040
Style.EmptyLineBeforeAccessModifier);
10411041
IO.mapOptional("ExperimentalAutoDetectBinPacking",
10421042
Style.ExperimentalAutoDetectBinPacking);
1043-
IO.mapOptional("IndentExportBlock", Style.IndentExportBlock);
10441043
IO.mapOptional("FixNamespaceComments", Style.FixNamespaceComments);
10451044
IO.mapOptional("ForEachMacros", Style.ForEachMacros);
10461045
IO.mapOptional("IfMacros", Style.IfMacros);
@@ -1052,6 +1051,7 @@ template <> struct MappingTraits<FormatStyle> {
10521051
IO.mapOptional("IndentAccessModifiers", Style.IndentAccessModifiers);
10531052
IO.mapOptional("IndentCaseBlocks", Style.IndentCaseBlocks);
10541053
IO.mapOptional("IndentCaseLabels", Style.IndentCaseLabels);
1054+
IO.mapOptional("IndentExportBlock", Style.IndentExportBlock);
10551055
IO.mapOptional("IndentExternBlock", Style.IndentExternBlock);
10561056
IO.mapOptional("IndentGotoLabels", Style.IndentGotoLabels);
10571057
IO.mapOptional("IndentPPDirectives", Style.IndentPPDirectives);
@@ -1551,7 +1551,6 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) {
15511551
LLVMStyle.EmptyLineAfterAccessModifier = FormatStyle::ELAAMS_Never;
15521552
LLVMStyle.EmptyLineBeforeAccessModifier = FormatStyle::ELBAMS_LogicalBlock;
15531553
LLVMStyle.ExperimentalAutoDetectBinPacking = false;
1554-
LLVMStyle.IndentExportBlock = true;
15551554
LLVMStyle.FixNamespaceComments = true;
15561555
LLVMStyle.ForEachMacros.push_back("foreach");
15571556
LLVMStyle.ForEachMacros.push_back("Q_FOREACH");
@@ -1567,6 +1566,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) {
15671566
LLVMStyle.IndentAccessModifiers = false;
15681567
LLVMStyle.IndentCaseBlocks = false;
15691568
LLVMStyle.IndentCaseLabels = false;
1569+
LLVMStyle.IndentExportBlock = true;
15701570
LLVMStyle.IndentExternBlock = FormatStyle::IEBS_AfterExternBlock;
15711571
LLVMStyle.IndentGotoLabels = true;
15721572
LLVMStyle.IndentPPDirectives = FormatStyle::PPDIS_None;

0 commit comments

Comments
 (0)