-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
662 lines (553 loc) · 31.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>ClangFormat | build your .clang-format interactively</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/vendor/solarized_dark.css">
<link rel="stylesheet" href="css/vendor/awesomplete.css">
</head>
<body>
<div class="container-fluid">
<h1>.clang-format</h1>
<p>An interactive guide and builder</p>
<section role="main" class="main row">
<div class="col-md-6 col-lg-6">
<div class="preview">
<p><a class="entry" href="#AccessModifierOffset">AccessModifierOffset: <input type="number" class="value" value="0" min="0"></a></p>
<p><a class="entry" href="#AlignEscapedNewlinesLeft">AlignEscapedNewlinesLeft: <input class="value bool awesomplete" data-list="#bool_list" value="true"></a></p>
<p><a class="entry" href="#AlignTrailingComments">AlignTrailingComments: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#AllowAllParametersOfDeclarationOnNextLine">AllowAllParametersOfDeclarationOnNextLine: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#AllowShortFunctionsOnASingleLine">AllowShortFunctionsOnASingleLine: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#AllowShortIfStatementsOnASingleLine">AllowShortIfStatementsOnASingleLine: <input class="value bool awesomplete" data-list="#bool_list" value="true"></a></p>
<p><a class="entry" href="#AllowShortLoopsOnASingleLine">AllowShortLoopsOnASingleLine: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#AlwaysBreakBeforeMultilineStrings">AlwaysBreakBeforeMultilineStrings: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#AlwaysBreakTemplateDeclarations">AlwaysBreakTemplateDeclarations: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#BinPackParameters">BinPackParameters: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#BreakBeforeBinaryOperators">BreakBeforeBinaryOperators: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#BreakBeforeBraces">BreakBeforeBraces: <input class="value awesomplete" data-list="Attach, Linux, Stroustrup, Allman, GNU" value="Allman"></a></p>
<p><a class="entry" href="#BreakBeforeTernaryOperators">BreakBeforeTernaryOperators: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#BreakConstructorInitializersBeforeComma">BreakConstructorInitializersBeforeComma: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#ColumnLimit">ColumnLimit: <input type="number" class="value" value="100" min="0"></a></p>
<p><a class="entry" href="#CommentPragmas">CommentPragmas: <input class="value" value="''"></a></p>
<p><a class="entry" href="#ConstructorInitializerAllOnOneLineOrOnePerLine">ConstructorInitializerAllOnOneLineOrOnePerLine: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#ConstructorInitializerIndentWidth">ConstructorInitializerIndentWidth: <input type="number" class="value" value="0" min="0"></a></p>
<p><a class="entry" href="#ContinuationIndentWidth">ContinuationIndentWidth: <input type="number" class="value" value="0" min="0"></a></p>
<p><a class="entry" href="#Cpp11BracedListStyle">Cpp11BracedListStyle: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#DerivePointerBinding">DerivePointerBinding: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#IndentCaseLabels">IndentCaseLabels: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#IndentFunctionDeclarationAfterType">IndentFunctionDeclarationAfterType: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#IndentWidth">IndentWidth: <input type="number" class="value" value="4" min="0"></a></p>
<p><a class="entry" href="#Language">Language: <input class="value awesomplete" data-list="None, Cpp, JavaScript, Proto" value="Cpp"></a></p>
<p><a class="entry" href="#MaxEmptyLinesToKeep">MaxEmptyLinesToKeep: <input type="number" class="value" value="2" min="0"></a></p>
<p><a class="entry" href="#NamespaceIndentation">NamespaceIndentation: <input class="value awesomplete" data-list="None, Inner, All" value="None"></a></p>
<p><a class="entry" href="#ObjCSpaceAfterProperty">ObjCSpaceAfterProperty: <input class="value bool awesomplete" data-list="#bool_list" value="true"></a></p>
<p><a class="entry" href="#ObjCSpaceBeforeProtocolList">ObjCSpaceBeforeProtocolList: <input class="value bool awesomplete" data-list="#bool_list" value="true"></a></p>
<p><a class="entry" href="#PenaltyBreakBeforeFirstCallParameter">PenaltyBreakBeforeFirstCallParameter: <input type="number" class="value" value="100" min="0"></a></p>
<p><a class="entry" href="#PenaltyBreakComment">PenaltyBreakComment: <input type="number" class="value" value="100" min="0"></a></p>
<p><a class="entry" href="#PenaltyBreakFirstLessLess">PenaltyBreakFirstLessLess: <input type="number" class="value" value="0" min="0"></a></p>
<p><a class="entry" href="#PenaltyBreakString">PenaltyBreakString: <input type="number" class="value" value="100" min="0"></a></p>
<p><a class="entry" href="#PenaltyExcessCharacter">PenaltyExcessCharacter: <input type="number" class="value" value="1" min="0"></a></p>
<p><a class="entry" href="#PenaltyReturnTypeOnItsOwnLine">PenaltyReturnTypeOnItsOwnLine: <input type="number" class="value" value="20" min="0"></a></p>
<p><a class="entry" href="#PointerBindsToType">PointerBindsToType: <input type="number" class="value" value="100" min="0"></a></p>
<p><a class="entry" href="#SpaceBeforeAssignmentOperators">SpaceBeforeAssignmentOperators: <input class="value bool awesomplete" data-list="#bool_list" value="true"></a></p>
<p><a class="entry" href="#SpaceBeforeParens">SpaceBeforeParens: <input class="value awesomplete" data-list="Never, ControlStatements, Always" value="Always"></a></p>
<p><a class="entry" href="#SpaceInEmptyParentheses">SpaceInEmptyParentheses: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#SpacesBeforeTrailingComments">SpacesBeforeTrailingComments: <input type="number" class="value" value="1" min="0"></a></p>
<p><a class="entry" href="#SpacesInAngles">SpacesInAngles: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#SpacesInCStyleCastParentheses">SpacesInCStyleCastParentheses: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#SpacesInContainerLiterals">SpacesInContainerLiterals: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#SpacesInParentheses">SpacesInParentheses: <input class="value bool awesomplete" data-list="#bool_list" value="false"></a></p>
<p><a class="entry" href="#Standard">Standard: <input class="value awesomplete" data-list="Cpp03, Cpp11, Auto" value="Cpp11"></a></p>
<p><a class="entry" href="#TabWidth">TabWidth: <input type="number" class="value" value="4" min="0" size="1"></a></p>
<p><a class="entry" href="#UseTab">UseTab: <input class="value awesomplete" data-list="Never, ForIndentation, Always" value="Never"></a></p>
</div>
</div>
<div hidden>
<!-- Awesomplete data list -->
<datalist id="bool_list">
<option>true</option>
<option>false</option>
</datalist>
</div>
<div class="col-md-6 col-lg-6 guide">
<div class="description">
<p>Roll over a line in the preview to the left to see a better description of what it means and configure it for your <code class="nowrap">.clang-format</code> file.</p>
</div>
<div class="descriptions">
<div id="AccessModifierOffset" class="description">
<h3>AccessModifierOffset (<code>int</code>)</h3>
<p>The extra indent or outdent of access modifiers, e.g. public:.</p>
</div>
<div id="AlignEscapedNewlinesLeft" class="description">
<h3>AlignEscapedNewlinesLeft (<code>bool</code>)</h3>
<p>If <code>true</code>, aligns escaped newlines as far left as possible. Otherwise puts them into the right-most column.</p>
<p>This does not necessarily mean flushing lings to the left but, rather, attempting to align the current line's left margin with the previous line's left margin.</p>
<h3>Example</h3>
<div class="example">
<div class="setting btn-group">
<button type="button" class="btn btn-default" data-target="AlignEscapedNewlinesLeft_true" data-toggle="code">true</button>
<button type="button" class="btn btn-default" data-target="AlignEscapedNewlinesLeft_false" data-toggle="code">false</button>
</div>
<div class="code-content">
<div id="AlignEscapedNewlinesLeft_true" class="code-pane">
<pre><code>if (foo && // Some comment
bar) {
baz();
}
void foo() {
someFunction();
someOtherFunction();
}
</code></pre>
</div>
<div id="AlignEscapedNewlinesLeft_false" class="code-pane">
<pre><code>if (foo && // Some Comment
bar) {
baz();
}
void foo() {
someFunction();
someOtherFunction();
}
</code></pre>
</div>
</div>
</div>
</div>
<div id="AlignTrailingComments" class="description">
<h3>AlignTrailingComments (<code>bool</code>)</h3>
<p>If <code>true</code>, aligns trailing comments.</p>
<h3>Example</h3>
<div class="example">
<div class="setting">
<button type="button" class="btn btn-default" data-target="AlignTrailingComments_true" data-toggle="code">true</button>
<button type="button" class="btn btn-default" data-target="AlignTrailingComments_false" data-toggle="code">false</button>
</div>
<div class="code-cotent">
<div id="AlignTrailingComments_true" class="code-pane">
<pre><code>// Unrelated comment
void someFunction() {
doWork(); // Does something
doMoreWork(); // Does something else
}</code></pre>
</div>
<div id="AlignTrailingComments_false" class="code-pane">
<pre><code>// Unrelated comment
void someFunction() {
doWork(); // Does something
doMoreWork(); // Does something else
}</code></pre>
</div>
</div>
</div>
</div>
<div id="AllowAllParametersOfDeclarationOnNextLine" class="description">
<h3>AllowAllParametersOfDeclarationOnNextLine (<code>bool</code>)</h3>
<p>Allow putting all parameters of a function declaration onto the next line even if BinPackParameters is false.</p>
<h3>Example</h3>
<div class="example">
<div class="setting">
<button type="button" class="btn btn-default" data-target="AllowAllParametersOfDeclarationOnNextLine_true" data-toggle="code">true</button>
<button type="button" class="btn btn-default" data-target="AllowAllParametersOfDeclarationOnNextLine_false" data-toggle="code">false</button>
</div>
<div class="code-content">
<div id="AllowAllParametersOfDeclarationOnNextLine_true" class="code-pane">
<pre><code>someFunction(foo,
bar,
baz);</code></pre>
</div>
<div id="AllowAllParametersOfDeclarationOnNextLine_false" class="code-pane">
<pre><code>someFunction(foo, bar, baz);</code></pre>
</div>
</div>
</div>
</div>
<div id="AllowShortFunctionsOnASingleLine" class="description">
<h3>AllowShortFunctionsOnASingleLine (<code>bool</code>)</h3>
<p>If <code>true</code>, <code>int f() { return 0; }</code> can be put on a single line.</p>
<h3>Example</h3>
<div class="example">
<div class="setting">
<button type="button" class="btn btn-default" data-target="AllowShortFunctionsOnASingleLine_true" data-toggle="code">true</button>
<button type="button" class="btn btn-default" data-target="AllowShortFunctionsOnASingleLine_false" data-toggle="code">false</button>
</div>
<div class="code-content">
<div id="AllowShortFunctionsOnASingleLine_true" class="code-pane">
<pre><code>int f() { return 0; }</code></pre>
</div>
<div id="AllowShortFunctionsOnASingleLine_false" class="code-pane">
<pre><code>int f() {
return 0;
}</code></pre>
</div>
</div>
</div>
</div>
<div id="AllowShortIfStatementsOnASingleLine" class="description">
<h3>AllowShortIfStatementsOnASingleLine (<code>bool</code>)</h3>
<p>If <code>true</code>, <code>if (a) return;</code> can be put on a single line.</p>
<h3>Example</h3>
<div class="example">
<div class="setting">
<button type="button" class="btn btn-default" data-target="AllowShortIfStatementsOnASingleLine_true" data-toggle="code">true</button>
<button type="button" class="btn btn-default" data-target="AllowShortIfStatementsOnASingleLine_false" data-toggle="code">false</button>
</div>
<div class="code-content">
<div id="AllowShortIfStatementsOnASingleLine_true" class="code-pane">
<pre><code>void foo() {
if (!someVar) return;
if (someOtherVar) return;
if (doingSomething) {
// Unrelated
}
}</code></pre>
</div>
<div id="AllowShortIfStatementsOnASingleLine_false" class="code-pane">
<pre><code>void foo() {
if (!someVar) {
return;
}
if (someOtherVar) {
return;
}
if (doingSomething) {
// Unrelated
}
}</code></pre>
</div>
</div>
</div>
</div>
<div id="AllowShortLoopsOnASingleLine" class="description">
<h3>AllowShortLoopsOnASingleLine (<code>bool</code>)</h3>
<p>If <code>true</code>, <code>while (true) continue;</code> can be put on a single line.</p>
<h3>Example</h3>
<div class="example">
<div class="setting">
<button type="button" class="btn btn-default" data-target="AllowShortLoopsOnASingleLine_true" data-toggle="code">true</button>
<button type="button" class="btn btn-default" data-target="AllowShortLoopsOnASingleLine_false" data-toggle="code">false</button>
</div>
<div class="code-content">
<div id="AllowShortLoopsOnASingleLine_true" class="code-pane">
<pre><code>void foo() {
// Eat some cycles
int i = 10000;
while(i>0) i--;
}</code></pre>
</div>
<div id="AllowShortLoopsOnASingleLine_false" class="code-pane">
<pre><code>void foo() {
// Eat some cycles
int i = 10000;
while(i>0) {
i--;
}
}</code></pre>
</div>
</div>
</div>
</div>
<div id="AlwaysBreakBeforeMultilineStrings" class="description">
<h3>AlwaysBreakBeforeMultilineStrings (<code>bool</code>)</h3>
<p>If <code>true</code>, always break before multiline string literals.</p>
</div>
<div id="AlwaysBreakTemplateDeclarations" class="description">
<h3>AlwaysBreakTemplateDeclarations (<code>bool</code>)</h3>
<p>If <code>true</code>, always break after the template<…> of a template declaration.</p>
</div>
<div id="BinPackParameters" class="description">
<h3>BinPackParameters (<code>bool</code>)</h3>
<p>If <code>false</code>, a function call’s or function definition’s parameters will either all be on the same line or will have one line each.</p>
</div>
<div id="BreakBeforeBinaryOperators" class="description">
<h3>BreakBeforeBinaryOperators (<code>bool</code>)</h3>
<p>If <code>true</code>, binary operators will be placed after line breaks.</p>
<h3>Example</h3>
<div class="example">
<div class="setting">
<button type="button" class="btn btn-default" data-target="BreakBeforeBinaryOperators_true" data-toggle="code">true</button>
<button type="button" class="btn btn-default" data-target="BreakBeforeBinaryOperators_false" data-toggle="code">false</button>
</div>
<div class="code-content">
<div id="BreakBeforeBinaryOperators_true" class="code-pane">
<pre><code>bool foo() {
bool value = someVal
+ anotherVal
+ thirdVal
== alternateValue
* fooVar
+ barVar
&& anotherCondition
> smallerCondition
* powerMultiplier;
if (someVal
+ anotherVal
* thirdVal
== finalVlaue) {
// ...
}
if (someVal) {
} else if (anotherVal && thirVal
> smallerVal)
{
// ...
}
return foo::bar::baz
== foo::bar::bop;
}</code></pre>
</div>
<div id="BreakBeforeBinaryOperators_false" class="code-pane">
<pre><code>bool foo() {
bool value = someVal + anotherVal + thirdVal == alternateValue * fooVar + barVar && anotherCondition > smallerCondition * powerMultiplier;
if (someVal + anotherVal * thirdVal == finalVlaue) {
// ...
}
if (someVal) {
} else if (anotherVal && thirVal > smallerVal)
{
// ...
}
return foo::bar::baz == foo::bar::bop;
}</code></pre>
</div>
</div>
</div>
</div>
<div id="BreakBeforeBraces" class="description">
<h3>BreakBeforeBraces (<code>BraceBreakingStyle</code>)</h3>
<p>The brace breaking style to use.</p>
<p>Possible values:</p>
<ul>
<li>BS_Attach (in configuration: Attach) Always attach braces to surrounding context.</li>
<li>BS_Linux (in configuration: Linux) Like Attach, but break before braces on function, namespace and class definitions.</li>
<li>BS_Stroustrup (in configuration: Stroustrup) Like Attach, but break before function definitions.</li>
<li>BS_Allman (in configuration: Allman) Always break before braces.</li>
<li>BS_GNU (in configuration: GNU) Always break before braces and add an extra level of indentation to braces of control statements, not to those of class, function or other definitions.</li>
</ul>
</div>
<div id="BreakBeforeTernaryOperators" class="description">
<h3>BreakBeforeTernaryOperators (<code>bool</code>)</h3>
<p>If true, ternary operators will be placed after line breaks.</p>
</div>
<div id="BreakConstructorInitializersBeforeComma" class="description">
<h3>BreakConstructorInitializersBeforeComma (<code>bool</code>)</h3>
<p>Always break constructor initializers before commas and align the commas with the colon.</p>
</div>
<div id="ColumnLimit" class="description">
<h3>ColumnLimit (<code>unsigned</code>)</h3>
<p>The column limit.</p>
<p>A column limit of 0 means that there is no column limit. In this case, clang-format will respect the input’s line breaking decisions within statements unless they contradict other rules.</p>
<h3>Example</h3>
<div class="example">
<div class="setting integer">
<label for="ColumnLimit_value">Maximum allowed columns:</label>
<input type="number" id="ColumnLimit_value" value="100" />
</div>
<div class="code-content">
<div class="code-pane">
<pre><code>// This is a very, very long comment that should can trimmed at some point depending on the configuration of the ColumnLimit
- (void)longMethodNameThatTakesAString:(NSString *)stringName aURL:(NSURL *)url andSomeDelegate(id<WeirdDelegate>)delegate
{
[super longMethodNameThatTakesAString:stringName aURL:url andSomeDelegate:delegate]; // Don't forget to call your parents!
// ...
}
</code></pre>
</div>
</div>
</div>
</div>
<div id="CommentPragmas" class="description">
<h3>CommentPragmas (<code>std::string</code>)</h3>
<p>A regular expression that describes comments with special meaning, which should not be split into lines or otherwise changed.</p>
</div>
<div id="ConstructorInitializerAllOnOneLineOrOnePerLine" class="description">
<h3>ConstructorInitializerAllOnOneLineOrOnePerLine (<code>bool</code>)</h3>
<p>If the constructor initializers don’t fit on a line, put each initializer on its own line.</p>
</div>
<div id="ConstructorInitializerIndentWidth" class="description">
<h3>ConstructorInitializerIndentWidth (<code>unsigned</code>)</h3>
<p>The number of characters to use for indentation of constructor initializer lists.</p>
</div>
<div id="ContinuationIndentWidth" class="description">
<h3>ContinuationIndentWidth (<code>unsigned</code>)</h3>
<p>Indent width for line continuations.</p>
</div>
<div id="Cpp11BracedListStyle" class="description">
<h3>Cpp11BracedListStyle (<code>bool</code>)</h3>
<p>If true, format braced lists as best suited for C++11 braced lists.</p>
<p>Important differences: - No spaces inside the braced list. - No line break before the closing brace. - Indentation with the continuation indent, not with the block indent.</p>
<p>Fundamentally, C++11 braced lists are formatted exactly like function calls would be formatted in their place. If the braced list follows a name (e.g. a type or variable name), clang-format formats as if the {} were the parentheses of a function call with that name. If there is no name, a zero-length name is assumed.</p>
</div>
<div id="DerivePointerBinding" class="description">
<h3>DerivePointerBinding (<code>bool</code>)</h3>
<p>If true, analyze the formatted file for the most common binding and use PointerBindsToType only as fallback.</p>
</div>
<div id="ExperimentalAutoDetectBinPacking" class="description">
<h3>ExperimentalAutoDetectBinPacking (<code>bool</code>)</h3>
<p>If true, clang-format detects whether function calls and definitions are formatted with one parameter per line.</p>
<p>Each call can be bin-packed, one-per-line or inconclusive. If it is inconclusive, e.g. completely on one line, but a decision needs to be made, clang-format analyzes whether there are other bin-packed cases in the input file and act accordingly.</p>
<p>NOTE: This is an experimental flag, that might go away or be renamed. Do not use this in config files, etc. Use at your own risk.</p>
</div>
<div id="IndentCaseLabels" class="description">
<h3>IndentCaseLabels (<code>bool</code>)</h3>
<p>Indent case labels one level from the switch statement.</p>
<p>When false, use the same indentation level as for the switch statement. Switch statement body is always indented one level more than case labels.</p>
</div>
<div id="IndentFunctionDeclarationAfterType" class="description">
<h3>IndentFunctionDeclarationAfterType (<code>bool</code>)</h3>
<p>If true, indent when breaking function declarations which are not also definitions after the type.</p>
</div>
<div id="IndentWidth" class="description">
<h3>IndentWidth (<code>unsigned</code>)</h3>
<p>The number of columns to use for indentation.</p>
</div>
<div id="Language" class="description">
<h3>Language (<code>LanguageKind</code>)</h3>
<p>Language, this format style is targeted at.</p>
<p>Possible values:</p>
<ul>
<li>LK_None (in configuration: None) Do not use.</li>
<li>LK_Cpp (in configuration: Cpp) Should be used for C, C++, ObjectiveC, ObjectiveC++.</li>
<li>LK_JavaScript (in configuration: JavaScript) Should be used for JavaScript.</li>
<li>LK_Proto (in configuration: Proto) Should be used for Protocol Buffers (https://developers.google.com/protocol-buffers/).</li>
</ul>
</div>
<div id="MaxEmptyLinesToKeep" class="description">
<h3>MaxEmptyLinesToKeep (<code>unsigned</code>)</h3>
<p>The maximum number of consecutive empty lines to keep.</p>
</div>
<div id="NamespaceIndentation" class="description">
<h3>NamespaceIndentation (<code>NamespaceIndentationKind</code>)</h3>
<p>The indentation used for namespaces.</p>
<p>Possible values:</p>
<ul>
<li>NI_None (in configuration: None) Don’t indent in namespaces.</li>
<li>NI_Inner (in configuration: Inner) Indent only in inner namespaces (nested in other namespaces).</li>
<li>NI_All (in configuration: All) Indent in all namespaces.</li>
</ul>
</div>
<div id="ObjCSpaceAfterProperty" class="description">
<h3>ObjCSpaceAfterProperty (<code>bool</code>)</h3>
<p>Add a space after @property in Objective-C, i.e. use @property (readonly) instead of @property(readonly).</p>
</div>
<div id="ObjCSpaceBeforeProtocolList" class="description">
<h3>ObjCSpaceBeforeProtocolList (<code>bool</code>)</h3>
<p>Add a space in front of an Objective-C protocol list, i.e. use Foo <Protocol> instead of Foo<Protocol>.</p>
</div>
<div id="PenaltyBreakBeforeFirstCallParameter" class="description">
<h3>PenaltyBreakBeforeFirstCallParameter (<code>unsigned</code>)</h3>
<p>The penalty for breaking a function call after “call(”.</p>
</div>
<div id="PenaltyBreakComment" class="description">
<h3>PenaltyBreakComment (<code>unsigned</code>)</h3>
<p>The penalty for each line break introduced inside a comment.</p>
</div>
<div id="PenaltyBreakFirstLessLess" class="description">
<h3>PenaltyBreakFirstLessLess (<code>unsigned</code>)</h3>
<p>The penalty for breaking before the first <<.</p>
</div>
<div id="PenaltyBreakString" class="description">
<h3>PenaltyBreakString (<code>unsigned</code>)</h3>
<p>The penalty for each line break introduced inside a string literal.</p>
</div>
<div id="PenaltyExcessCharacter" class="description">
<h3>PenaltyExcessCharacter (<code>unsigned</code>)</h3>
<p>The penalty for each character outside of the column limit.</p>
</div>
<div id="PenaltyReturnTypeOnItsOwnLine" class="description">
<h3>PenaltyReturnTypeOnItsOwnLine (<code>unsigned</code>)</h3>
<p>Penalty for putting the return type of a function onto its own line.</p>
</div>
<div id="PointerBindsToType" class="description">
<h3>PointerBindsToType (<code>bool</code>)</h3>
<p>Set whether & and * bind to the type as opposed to the variable.</p>
</div>
<div id="SpaceBeforeAssignmentOperators" class="description">
<h3>SpaceBeforeAssignmentOperators (<code>bool</code>)</h3>
<p>If false, spaces will be removed before assignment operators.</p>
</div>
<div id="SpaceBeforeParens" class="description">
<h3>SpaceBeforeParens (<code>SpaceBeforeParensOptions</code>)</h3>
<p>Defines in which cases to put a space before opening parentheses.</p>
<p>Possible values:</p>
<ul>
<li>SBPO_Never (in configuration: Never) Never put a space before opening parentheses.</li>
<li>SBPO_ControlStatements (in configuration: ControlStatements) Put a space before opening parentheses only after control statement keywords (for/if/while...).</p></li>
<li>SBPO_Always (in configuration: Always) Always put a space before opening parentheses, except when it’s prohibited by the syntax rules (in function-like macro definitions) or when determined by other style rules (after unary operators, opening parentheses, etc.)</li>
</ul>
</div>
<div id="SpaceInEmptyParentheses" class="description">
<h3>SpaceInEmptyParentheses (<code>bool</code>)</h3>
<p>If true, spaces may be inserted into ‘()’.</p>
</div>
<div id="SpacesBeforeTrailingComments" class="description">
<h3>SpacesBeforeTrailingComments (<code>unsigned</code>)</h3>
<p>The number of spaces to before trailing line comments.</p>
</div>
<div id="SpacesInAngles" class="description">
<h3>SpacesInAngles (<code>bool</code>)</h3>
<p>If true, spaces will be inserted after ‘<’ and before ‘>’ in template argument lists</p>
</div>
<div id="SpacesInCStyleCastParentheses" class="description">
<h3>SpacesInCStyleCastParentheses (<code>bool</code>)</h3>
<p>If true, spaces may be inserted into C style casts.</p>
</div>
<div id="SpacesInContainerLiterals" class="description">
<h3>SpacesInContainerLiterals (<code>bool</code>)</h3>
<p>If true, spaces are inserted inside container literals (e.g. ObjC and JavaScript array and dict literals).</p>
</div>
<div id="SpacesInParentheses" class="description">
<h3>SpacesInParentheses (<code>bool</code>)</h3>
<p>If true, spaces will be inserted after ‘(‘ and before ‘)’.</p>
</div>
<div id="Standard" class="description">
<h3>Standard (<code>LanguageStandard</code>)</h3>
<p>Format compatible with this standard, e.g. use A<A<int> > instead of A<A<int>> for LS_Cpp03.</p>
<p>Possible values:</p>
<ul>
<li>LS_Cpp03 (in configuration: Cpp03) Use C++03-compatible syntax.</li>
<li>LS_Cpp11 (in configuration: Cpp11) Use features of C++11 (e.g. A<A<int>> instead of A<A<int> >).</li>
<li>LS_Auto (in configuration: Auto) Automatic detection based on the input.</li>
</ul>
</div>
<div id="TabWidth" class="description">
<h3>TabWidth (<code>unsigned</code>)</h3>
<p>The number of columns used for tab stops.</p>
</div>
<div id="UseTab" class="description">
<h3>UseTab (<code>UseTabStyle</code>)</h3>
<p>The way to use tab characters in the resulting file.</p>
<p>Possible values:</p>
<ul>
<li>UT_Never (in configuration: Never) Never use tab.</li>
<li>UT_ForIndentation (in configuration: ForIndentation) Use tabs only for indentation.</li>
<li>UT_Always (in configuration: Always) Use tabs whenever we need to fill whitespace that spans at least from one tab stop to the next one.</li>
</ul>
</div>
</div>
</div>
</section>
</div>
<!--
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.1.min.js"><\/script>')</script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
// -->
<script src="js/vendor/highlight.pack.js"></script>
<script src="js/vendor/awesomplete.min.js" async></script>
<script src="js/main.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-333228-9', 'clangformat.com');
ga('send', 'pageview');
</script>
</body>
</html>