#author("2020-07-21T13:19:04+00:00","","")
#topicpath

//////////////////////////////////////////////////////////////////////////////
* 目次 [#zf6aaa09]
#contents();

//////////////////////////////////////////////////////////////////////////////
* 書式オプション(抜粋) [#cbbe2cff]

//============================================================================
** Language: [#r652b10a]
|~val       |~description |
|None       |使用しない |
|Cpp        |C, C++, Objective-C, Objective-C++ を使用する |
|Java       |Java を使用する |
|JavaScript |JavaScript を使用する |
|Proto      |[[Protocol Buffers>https://developers.google.com/protocol-buffers/]] |

//============================================================================
** AccessModifierOffset: [#y2363b3b]

//============================================================================
** AlignAfterOpenBracket: [#va67ab73]

//============================================================================
** AlignConsecutiveAssignments: [#j3fac10f]

//============================================================================
** AlignConsecutiveDeclarations: [#qff02db2]

//============================================================================
** AlignEscapedNewlinesLeft: [#h9b854e9]

//============================================================================
** AlignOperands: [#n00eac18]

//============================================================================
** AlignTrailingComments: [#vfbf452b]

//============================================================================
** AllowAllParametersOfDeclarationOnNextLine: [#sae7368d]

//============================================================================
** AllowShortBlocksOnASingleLine: [#p85e716f]

//============================================================================
** AllowShortCaseLabelsOnASingleLine: [#z131c8bc]

//============================================================================
** AllowShortFunctionsOnASingleLine: [#dce76bfa]

//============================================================================
** AllowShortIfStatementsOnASingleLine: [#w26c3548]

//============================================================================
** AllowShortLoopsOnASingleLine: [#kff2e776]

//============================================================================
** AlwaysBreakAfterDefinitionReturnType: [#e2cf0f79]

//============================================================================
** AlwaysBreakAfterReturnType: [#u32cd482]

//============================================================================
** AlwaysBreakBeforeMultilineStrings: [#v40e1938]

//============================================================================
** AlwaysBreakTemplateDeclarations: [#y25557f4]

//============================================================================
** BinPackArguments: [#ia3d009b]

//============================================================================
** BinPackParameters: [#v9fb1dea]

//============================================================================
** BraceWrapping: [#n9ac2f6f]

//----------------------------------------------------------------------------
*** AfterClass: [#r3ca3958]

//----------------------------------------------------------------------------
*** AfterControlStatement: [#kae57280]

//----------------------------------------------------------------------------
*** AfterEnum: [#k51b89c7]

//----------------------------------------------------------------------------
*** AfterFunction: [#a31f9cf9]

//----------------------------------------------------------------------------
*** AfterNamespace: [#c3c1226f]

//----------------------------------------------------------------------------
*** AfterObjCDeclaration: [#c89d4168]

//----------------------------------------------------------------------------
*** AfterStruct: [#g2564b61]

//----------------------------------------------------------------------------
*** AfterUnion: [#haacaa46]

//----------------------------------------------------------------------------
*** BeforeCatch: [#ae2a006c]

//----------------------------------------------------------------------------
*** BeforeElse: [#m3b859c3]

//----------------------------------------------------------------------------
*** IndentBraces: [#w79f7cc5]

//============================================================================
** BreakBeforeBinaryOperators: [#eba844fb]

//============================================================================
** BreakBeforeBraces: [#r15abe94]
- 波括弧 ''{ }'' の改行の設定
- Attach
-- 波括弧は常に周囲のコンテキストにくっつける。
 enum HOGE_EN {
     EN_AAA,
     EN_ABC,
     EN_ZZZ,
 };
 
 struct st_aaa {
     int aaa[2];
     uint64_t ax;
 };
 
 void func(int arg) {
     // ...
     if (arg == 0) {
         // ...
     } else {
         // ...
     }
     return;
 }


- Linux
-- Attach に似るが、関数や名前空間、クラス定義の前は改行する。
 enum HOGE_EN {
     EN_AAA,
     EN_ABC,
     EN_ZZZ,
 };
 
 struct st_aaa {
     int aaa[2];
     uint64_t ax;
 };
 
 void func(int arg)
 {
     // ...
     if (arg == 0) {
         // ...
     } else {
         // ...
     }
     return;
 }


- Mozilla
-- Attach と似るが、 enum、関数定義などの前には改行する。
 enum HOGE_EN
 {
     EN_AAA,
     EN_ABC,
     EN_ZZZ,
 };
 
 struct st_aaa
 {
     int aaa[2];
     uint64_t ax;
 };
 
 void func(int arg)
 {
     // ...
     if (arg == 0) {
         // ...
     } else {
         // ...
     }
     return;
 }


- Stroustrup
-- Attach と似るが、catch, else などの前は改行する。
 enum HOGE_EN {
     EN_AAA,
     EN_ABC,
     EN_ZZZ,
 };
 
 struct st_aaa {
     int aaa[2];
     uint64_t ax;
 };
 
 void func(int arg)
 {
     // ...
     if (arg == 0) {
         // ...
     }
     else {
         // ...
     }
     return;
 }


- Allman
-- 波括弧の前は全て改行する。
 enum HOGE_EN
 {
     EN_AAA,
     EN_ABC,
     EN_ZZZ,
 };
 
 struct st_aaa
 {
     int aaa[2];
     uint64_t ax;
 };
 
 void func(int arg)
 {
     // ...
     if (arg == 0)
     {
         // ...
     }
     else
     {
         // ...
     }
     return;
 }



- GNU
-- 波括弧の前は全て改行するし、新たにインデントを加える。但し、クラス定義や関数定義などの場合は除く。
 enum HOGE_EN
 {
     EN_AAA,
     EN_ABC,
     EN_ZZZ,
 };
 
 struct st_aaa
 {
     int aaa[2];
     uint64_t ax;
 };
 
 void func(int arg)
 {
     // ...
     if (arg == 0)
         {
             // ...
         }
     else
         {
             // ...
         }
     return;
 }


//============================================================================
** BreakBeforeTernaryOperators: [#sffea887]

//============================================================================
** BreakConstructorInitializersBeforeComma: [#r8e30fba]
- コンストラクタの変数初期化のコンマの前で改行し、コンマとコロンを整列させるかどうか
- true

- false


//============================================================================
** ColumnLimit: [#l0533b37]
- 行の長さの上限値。
- 0 に設定した場合は、上限なしとなる。

//============================================================================
** CommentPragmas: [#u99be49b]

//============================================================================
** ConstructorInitializerAllOnOneLineOrOnePerLine: [#r75290fb]

//============================================================================
** ConstructorInitializerIndentWidth: [#ze984459]

//============================================================================
** ContinuationIndentWidth: [#aaefdf2a]

//============================================================================
** Cpp11BracedListStyle: [#iedfc19b]

//============================================================================
** DerivePointerAlignment: [#f9b31830]

//============================================================================
** DisableFormat: [#v21da5cf]

//============================================================================
** ExperimentalAutoDetectBinPacking: [#q9649d58]

//============================================================================
** ForEachMacros: [#e39475f0]

//============================================================================
** IncludeCategories: [#ucb42990]

//----------------------------------------------------------------------------
*** - [#be585d44]

//----------------------------------------------------------------------------
*** Priority: [#lc646fac]

//----------------------------------------------------------------------------
*** - [#w1262625]

//----------------------------------------------------------------------------
*** Priority: [#hde528d1]

//----------------------------------------------------------------------------
*** - [#l3196565]

//----------------------------------------------------------------------------
*** Priority: [#g1cb84bf]

//============================================================================
** IndentCaseLabels: [#x3a42b57]

//============================================================================
** IndentWidth: [#d4935225]

//============================================================================
** IndentWrappedFunctionNames: [#vb5d40c0]

//============================================================================
** KeepEmptyLinesAtTheStartOfBlocks: [#n643d905]

//============================================================================
** MacroBlockBegin: [#h7d1a026]

//============================================================================
** MacroBlockEnd: [#k77ca862]

//============================================================================
** MaxEmptyLinesToKeep: [#mf4db716]

//============================================================================
** NamespaceIndentation: [#o82a7483]

//============================================================================
** ObjCBlockIndentWidth: [#d2ad2676]

//============================================================================
** ObjCSpaceAfterProperty: [#p8f59fc2]

//============================================================================
** ObjCSpaceBeforeProtocolList: [#rc1aedf9]

//============================================================================
** PenaltyBreakBeforeFirstCallParameter: [#b8c42877]

//============================================================================
** PenaltyBreakComment: [#s63e6446]

//============================================================================
** PenaltyBreakFirstLessLess: [#v647e833]

//============================================================================
** PenaltyBreakString: [#qbd919c2]

//============================================================================
** PenaltyExcessCharacter: [#t230560c]

//============================================================================
** PenaltyReturnTypeOnItsOwnLine: [#cc33121d]

//============================================================================
** PointerAlignment: [#v30bb7ce]

//============================================================================
** ReflowComments: [#ucf9ed66]

//============================================================================
** SortIncludes: [#b6797f9d]

//============================================================================
** SpaceAfterCStyleCast: [#uebb1034]

//============================================================================
** SpaceBeforeAssignmentOperators: [#x29447e9]

//============================================================================
** SpaceBeforeParens: [#iacb23cc]

//============================================================================
** SpaceInEmptyParentheses: [#t24393b1]

//============================================================================
** SpacesBeforeTrailingComments: [#da132129]

//============================================================================
** SpacesInAngles: [#i7770e5a]

//============================================================================
** SpacesInContainerLiterals: [#k77db928]

//============================================================================
** SpacesInCStyleCastParentheses: [#w07105c2]

//============================================================================
** SpacesInParentheses: [#d281fbe1]

//============================================================================
** SpacesInSquareBrackets: [#m8113bc9]

//============================================================================
** Standard: [#z92f7f34]

//============================================================================
** TabWidth: [#pbdbd121]

//============================================================================
** UseTab: [#f5d7899e]


//////////////////////////////////////////////////////////////////////////////
* 参考リンク [#ac84b4cf]
- [[ClangFormat — Algo13 2016.12.17 ドキュメント>http://algo13.net/clang/clang-format-style-oputions.html]]
- [[clang-format を イイ感じに設定する - def yasuharu519(self):>https://yasuharu519.hatenablog.com/entry/2015/12/13/210825]]

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS