Skip to content

Commit a5a67aa

Browse files
csyongheTim Foley
and
Tim Foley
authored
Checkin .clang-format and an example file for discussion (shader-slang#1373)
* Checkin .clang-format and an example file for discussion * Update clang-format settings per discussion comments * update .clang-format * Move .clangformat file to extras/ folder Co-authored-by: Yong He <yhe@nvidia.com> Co-authored-by: Tim Foley <tfoleyNV@users.noreply.github.com>
1 parent 9590948 commit a5a67aa

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

extras/.clang-format

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
BasedOnStyle: LLVM
3+
IndentWidth: 4
4+
---
5+
Language: Cpp
6+
# Force pointers to the type for C++.
7+
IndentPPDirectives: AfterHash
8+
DerivePointerAlignment: false
9+
PointerAlignment: Left
10+
BinPackArguments: false
11+
BinPackParameters: false
12+
ExperimentalAutoDetectBinPacking: false
13+
AllowAllParametersOfDeclarationOnNextLine: true
14+
NamespaceIndentation: None
15+
FixNamespaceComments: true
16+
AccessModifierOffset: -4
17+
AlignTrailingComments: false
18+
ConstructorInitializerIndentWidth: 4
19+
AlignEscapedNewlinesLeft: true
20+
PenaltyReturnTypeOnItsOwnLine: 100
21+
ColumnLimit: 100
22+
IncludeBlocks: Preserve
23+
AlignAfterOpenBracket: AlwaysBreak
24+
IndentCaseBlocks: true
25+
SortIncludes: true
26+
SortUsingDeclarations: true
27+
UseTab: Never
28+
BreakConstructorInitializers: BeforeComma
29+
BreakInheritanceList: BeforeComma
30+
BreakBeforeBraces: Custom
31+
BraceWrapping:
32+
AfterCaseLabel: true
33+
AfterClass: true
34+
AfterEnum: true
35+
AfterStruct: true
36+
AfterUnion: true
37+
SplitEmptyFunction: false
38+
AfterControlStatement: Always
39+
AfterFunction: true
40+
AfterNamespace: true
41+
AfterExternBlock: true
42+
BeforeCatch: true
43+
BeforeElse: true
44+
# BeforeLambdaBody: true
45+
# BeforeWhile: false
46+
IndentBraces: false
47+
SplitEmptyFunction: false
48+
SplitEmptyRecord: false

0 commit comments

Comments
 (0)