Skip to content

Commit

Permalink
Updates clang-format to LLVM v10.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zwoop committed May 14, 2020
1 parent 02e8d5e commit a01b94b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
14 changes: 12 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: All
Expand Down Expand Up @@ -56,6 +56,7 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
Expand All @@ -71,12 +72,17 @@ IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
- Regex: '^(<|"(gtest|isl|json)/)'
Priority: 3
SortPriority: 0
- Regex: '.*'
Priority: 1
SortPriority: 0
IncludeIsMainRegex: '$'
IncludeIsMainSourceRegex: ''
IndentCaseLabels: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
Expand Down Expand Up @@ -112,18 +118,22 @@ SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
SpaceBeforeSquareBrackets: false
Standard: Latest
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
...

6 changes: 3 additions & 3 deletions tools/clang-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
# limitations under the License.

# Update the PKGDATE with the new version date when making a new clang-format binary package.
PKGDATE="20191031"
PKGDATE="20200514"

function main() {
set -e # exit on error
ROOT=${ROOT:-$(cd $(dirname $0) && git rev-parse --show-toplevel)/.git/fmt/${PKGDATE}}

DIR=${1:-.}
PACKAGE="clang-format-${PKGDATE}.tar.bz2"
VERSION="clang-format version 9.0.0 (https://github.com/llvm/llvm-project.git 0399d5a9682b3cef71c653373e38890c63c4c365)"
VERSION="clang-format version 10.0.0 (https://github.com/llvm/llvm-project.git d32170dbd5b0d54436537b6b75beaf44324e0c28)"

URL=${URL:-https://ci.trafficserver.apache.org/bintray/${PACKAGE}}

Expand Down Expand Up @@ -62,7 +62,7 @@ function main() {
${CURL} -L --progress-bar -o ${ARCHIVE} ${URL}
${TAR} -x -C ${ROOT} -f ${ARCHIVE}
cat > ${ROOT}/sha1 << EOF
c1b7ae57bfc80507ee155779a1ab8cf919b3e062 ${ARCHIVE}
5eec43e5c7f3010d6e6f37639491cabe51de0ab2 ${ARCHIVE}
EOF
${SHASUM} -c ${ROOT}/sha1
chmod +x ${FORMAT}
Expand Down

0 comments on commit a01b94b

Please sign in to comment.