[flang] Remove non-alignment based divergences from LLVM formatting.
This only changs the clang-format file and adds documentation referring to the new process for formatting code. A future commit will perform a reformatting according to these new formatting settings. Original-commit: flang-compiler/f18@02531d788e Reviewed-on: https://github.com/flang-compiler/f18/pull/945
This commit is contained in:
parent
37524c901a
commit
3214c18774
@ -3,16 +3,10 @@
|
|||||||
BasedOnStyle: LLVM
|
BasedOnStyle: LLVM
|
||||||
AlignAfterOpenBracket: DontAlign
|
AlignAfterOpenBracket: DontAlign
|
||||||
AlignEscapedNewlines: DontAlign
|
AlignEscapedNewlines: DontAlign
|
||||||
AllowShortCaseLabelsOnASingleLine: true
|
|
||||||
AllowShortIfStatementsOnASingleLine: true
|
|
||||||
AlignConsecutiveAssignments: false
|
AlignConsecutiveAssignments: false
|
||||||
AlignConsecutiveDeclarations: false
|
AlignConsecutiveDeclarations: false
|
||||||
AlignOperands: false
|
AlignOperands: false
|
||||||
AlignTrailingComments: false
|
AlignTrailingComments: false
|
||||||
ConstructorInitializerIndentWidth: 2
|
|
||||||
SpaceAfterTemplateKeyword: false
|
|
||||||
SpacesBeforeTrailingComments: 2
|
|
||||||
FixNamespaceComments: false
|
|
||||||
IncludeCategories:
|
IncludeCategories:
|
||||||
- Regex: '^<'
|
- Regex: '^<'
|
||||||
Priority: 4
|
Priority: 4
|
||||||
|
@ -88,9 +88,9 @@ well as you do and avoid distracting her by calling out usage of new
|
|||||||
features in comments.
|
features in comments.
|
||||||
|
|
||||||
### Layout
|
### Layout
|
||||||
Always run `clang-format` before committing code. Other developers should
|
Always run `clang-format` on your changes before committing code. LLVM
|
||||||
be able to run `git pull`, then `clang-format`, and see only their own
|
has a `git-clang-format` script to facilitate running clang-format only
|
||||||
changes. Use `clang-format` from llvm 7.
|
on the lines that have changed.
|
||||||
|
|
||||||
Here's what you can expect to see `clang-format` do:
|
Here's what you can expect to see `clang-format` do:
|
||||||
1. Indent with two spaces.
|
1. Indent with two spaces.
|
||||||
|
@ -31,7 +31,7 @@ can also be used when reviewing pull requests.
|
|||||||
## Follow the style guide
|
## Follow the style guide
|
||||||
The following items are taken from the [C++ style guide](C++style.md). But
|
The following items are taken from the [C++ style guide](C++style.md). But
|
||||||
even though I've read the style guide, they regularly trip me up.
|
even though I've read the style guide, they regularly trip me up.
|
||||||
* Run clang-format version 7 on all .cpp and .h files.
|
* Run clang-format using the git-clang-format script from LLVM HEAD.
|
||||||
* Make sure that all source lines have 80 or fewer characters. Note that
|
* Make sure that all source lines have 80 or fewer characters. Note that
|
||||||
clang-format will do this for most code. But you may need to break up long
|
clang-format will do this for most code. But you may need to break up long
|
||||||
strings.
|
strings.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user