summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2020-07-08 13:53:10 -0700
committerGitHub <noreply@github.com>2020-07-08 13:53:10 -0700
commita5a67aae981cb54d535089b167d3edcc3a3a2e29 (patch)
tree27b34856c539d6828966be6ab040cdeab55ee9ff /extras
parent9590948e075b81fc2bf2d5ce84e9253861080048 (diff)
Checkin .clang-format and an example file for discussion (#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>
Diffstat (limited to 'extras')
-rw-r--r--extras/.clang-format48
1 files changed, 48 insertions, 0 deletions
diff --git a/extras/.clang-format b/extras/.clang-format
new file mode 100644
index 000000000..81cacff35
--- /dev/null
+++ b/extras/.clang-format
@@ -0,0 +1,48 @@
+---
+BasedOnStyle: LLVM
+IndentWidth: 4
+---
+Language: Cpp
+# Force pointers to the type for C++.
+IndentPPDirectives: AfterHash
+DerivePointerAlignment: false
+PointerAlignment: Left
+BinPackArguments: false
+BinPackParameters: false
+ExperimentalAutoDetectBinPacking: false
+AllowAllParametersOfDeclarationOnNextLine: true
+NamespaceIndentation: None
+FixNamespaceComments: true
+AccessModifierOffset: -4
+AlignTrailingComments: false
+ConstructorInitializerIndentWidth: 4
+AlignEscapedNewlinesLeft: true
+PenaltyReturnTypeOnItsOwnLine: 100
+ColumnLimit: 100
+IncludeBlocks: Preserve
+AlignAfterOpenBracket: AlwaysBreak
+IndentCaseBlocks: true
+SortIncludes: true
+SortUsingDeclarations: true
+UseTab: Never
+BreakConstructorInitializers: BeforeComma
+BreakInheritanceList: BeforeComma
+BreakBeforeBraces: Custom
+BraceWrapping:
+ AfterCaseLabel: true
+ AfterClass: true
+ AfterEnum: true
+ AfterStruct: true
+ AfterUnion: true
+ SplitEmptyFunction: false
+ AfterControlStatement: Always
+ AfterFunction: true
+ AfterNamespace: true
+ AfterExternBlock: true
+ BeforeCatch: true
+ BeforeElse: true
+ # BeforeLambdaBody: true
+ # BeforeWhile: false
+ IndentBraces: false
+ SplitEmptyFunction: false
+ SplitEmptyRecord: false \ No newline at end of file