forked from OSchip/llvm-project
[flang] Add .clang-format and "make formatted" rule.
Original-commit: flang-compiler/f18@5ef28a6112
This commit is contained in:
parent
ac12232e68
commit
340a4320b4
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
# See: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
||||
BasedOnStyle: LLVM
|
||||
SpacesBeforeTrailingComments: 2
|
||||
AlignEscapedNewlines: DontAlign
|
||||
AllowShortCaseLabelsOnASingleLine: true
|
||||
AllowShortIfStatementsOnASingleLine: true
|
||||
ConstructorInitializerIndentWidth: 2
|
||||
AlignAfterOpenBracket: AlwaysBreak
|
||||
AlignOperands: false
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignTrailingComments: false
|
||||
SpaceAfterTemplateKeyword: false
|
||||
BreakBeforeBinaryOperators: All
|
||||
BreakBeforeTernaryOperators: true
|
||||
ContinuationIndentWidth: 2
|
||||
...
|
||||
|
||||
# vim:set filetype=yaml:
|
|
@ -7,3 +7,4 @@ f18
|
|||
CMakeCache.txt
|
||||
CMakeFiles/*
|
||||
cmake_install.cmake
|
||||
formatted
|
||||
|
|
|
@ -51,3 +51,13 @@ parse-state.h: message.h position.h
|
|||
@touch $@
|
||||
parse-tree.h: format-specification.h idioms.h indirection.h position.h
|
||||
@touch $@
|
||||
|
||||
|
||||
CLANG_FORMAT=/proj/pgi/flang/x86_64/flang-dev/bin/clang-format
|
||||
formatted:
|
||||
@mkdir -p formatted
|
||||
@for x in *.h *.cc; do \
|
||||
$(CLANG_FORMAT) < $$x > formatted/$$x; \
|
||||
done
|
||||
|
||||
.PHONY: formatted
|
||||
|
|
Loading…
Reference in New Issue