[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
|
||||
AlignAfterOpenBracket: DontAlign
|
||||
AlignEscapedNewlines: DontAlign
|
||||
AllowShortCaseLabelsOnASingleLine: true
|
||||
AllowShortIfStatementsOnASingleLine: true
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignOperands: false
|
||||
AlignTrailingComments: false
|
||||
ConstructorInitializerIndentWidth: 2
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SpacesBeforeTrailingComments: 2
|
||||
FixNamespaceComments: false
|
||||
IncludeCategories:
|
||||
- Regex: '^<'
|
||||
Priority: 4
|
||||
|
|
|
@ -88,9 +88,9 @@ well as you do and avoid distracting her by calling out usage of new
|
|||
features in comments.
|
||||
|
||||
### Layout
|
||||
Always run `clang-format` before committing code. Other developers should
|
||||
be able to run `git pull`, then `clang-format`, and see only their own
|
||||
changes. Use `clang-format` from llvm 7.
|
||||
Always run `clang-format` on your changes before committing code. LLVM
|
||||
has a `git-clang-format` script to facilitate running clang-format only
|
||||
on the lines that have changed.
|
||||
|
||||
Here's what you can expect to see `clang-format` do:
|
||||
1. Indent with two spaces.
|
||||
|
|
|
@ -31,7 +31,7 @@ can also be used when reviewing pull requests.
|
|||
## Follow the style guide
|
||||
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.
|
||||
* 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
|
||||
clang-format will do this for most code. But you may need to break up long
|
||||
strings.
|
||||
|
|
Loading…
Reference in New Issue
Block a user