Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into tsan
Browse files Browse the repository at this point in the history
  • Loading branch information
msimberg committed Jun 12, 2024
2 parents 025dba1 + e803346 commit 11ff21f
Show file tree
Hide file tree
Showing 220 changed files with 3,219 additions and 1,905 deletions.
86 changes: 64 additions & 22 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
# For clang-format version 15!
# For clang-format version 18!

Language: Cpp

AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
Expand All @@ -11,53 +10,67 @@ AlignConsecutiveAssignments:
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveBitFields:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveShortCaseStatements:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCaseColons: false
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: true
AllowBreakBeforeNoexceptSpecifier: Never
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortCompoundRequirementOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Empty
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: After
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterExternBlock: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
Expand All @@ -66,26 +79,26 @@ BraceWrapping:
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakAdjacentStringLiterals: true
BreakAfterAttributes: Never
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: Allowed
BreakBeforeBraces: Custom
BreakInheritanceList: BeforeColon
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
BreakStringLiterals: false
ColumnLimit: 105
CommentPragmas: '^ IWYU pragma:'
QualifierAlignment: Left
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: false
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always
PackConstructorInitializers: BinPack
FixNamespaceComments: false
ForEachMacros:
- foreach
Expand Down Expand Up @@ -126,44 +139,64 @@ IncludeCategories:
IncludeIsMainRegex: '_disabled$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseLabels: true
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequiresClause: true
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertBraces: false
InsertNewlineAtEOF: true
IntegerLiteralSeparator:
Binary: -1
BinaryMinDigits: 0
Decimal: -1
DecimalMinDigits: 0
Hex: -1
HexMinDigits: 0
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
KeepEmptyLinesAtEOF: false
LambdaBodyIndentation: Signature
LineEnding: LF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 2500
PenaltyBreakComment: 1500
PenaltyBreakFirstLessLess: 500
PenaltyBreakOpenParenthesis: 50
PenaltyBreakScopeResolution: 500
PenaltyBreakString: 10000
PenaltyBreakTemplateDeclaration: 500
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 1000
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 1000
PointerAlignment: Left
PPIndentWidth: -1
QualifierAlignment: Left
ReferenceAlignment: Pointer
ReflowComments: true
RemoveBracesLLVM: false
RemoveParentheses: Leave
RemoveSemicolon: true
RequiresClausePosition: WithPreceding
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 10
SkipMacroDefinitionBody: false
SortIncludes: CaseInsensitive
SortUsingDeclarations: true
SortUsingDeclarations: LexicographicNumeric
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
Expand All @@ -177,27 +210,36 @@ SpaceBeforeParensOptions:
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
AfterPlacementOperator: false
AfterRequiresInClause: false
AfterRequiresInExpression: false
BeforeNonEmptyParentheses: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInParens: Never
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: After
Standard: Latest
TabWidth: 8
UseCRLF: false
TypeNames:
- ElementType
- GlobalElementIndex
- GlobalElementSize
- GlobalTileIndex
- GlobalTileSize
- LocalElementIndex
- LocalElementSize
- LocalTileIndex
- LocalTileSize
- SizeType
- TileElementIndex
- TileElementSize
UseTab: Never
VerilogBreakBetweenInstancePorts: true
...
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Reformat with clang-format-18
e92ebf89c466f3291f7e61134c37c996e2e94a3f

# Reformat with clang-format-15
7f35ac9fe6710addbf1003de547e272f329ec1c1

Expand Down
2 changes: 1 addition & 1 deletion .github/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ do

case $FILE in
*.cpp|*.h|*.h.in|*.tpp|*.cu)
clang-format-15 -i --style=file $FILE
clang-format-18 -i --style=file $FILE
# The following is needed for regions in which clang-format is disabled.
# Note: clang-format removes trailing spaces even in disabled regions.
# Check if tab are present.
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/check_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
check:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand All @@ -24,9 +24,9 @@ jobs:
- name: Install tools
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends clang-format-15 python3
pip3 install black==23.03.0
pip3 install cmakelang==0.6.13
sudo apt-get install --no-install-recommends clang-format-18 python3 python3-pip
pip3 install --break-system-packages black==24.4.2
pip3 install --break-system-packages cmakelang==0.6.13
- name: Fetch master
run: git fetch --no-tags --depth=1 origin +refs/heads/master:refs/heads/master
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Check include guards
if: always()
run: |
find include test -type f '(' -name "*.h" -o -name "*.h.in" ')' \
find . test -type f '(' -name "*.h" -o -name "*.h.in" ')' \
| xargs -I{} sh -c \
"egrep -sq '^#pragma once' {} || echo {}" \
> pragma-once.check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_license_header.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on: [pull_request]

jobs:
check-licenses:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/javascript-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
doc:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Install tools
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/inshpect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Inshpect

on:
pull_request:

jobs:
inshpect:
runs-on: ubuntu-24.04

steps:
- name: Install tools
run: |
sudo apt update
sudo apt install -y fd-find ripgrep dasel
pushd /tmp
curl --output inshpect \
--location https://raw.githubusercontent.com/msimberg/inshpect/d31ba8ed7e636c57cb9085ed3a8450d998e6b8a5/inshpect
echo "4b891a178fa99ac800b9b92acc0596d72f640ca1ae6de7f35ac4b3785dcd7af9 inshpect" | sha256sum --check
chmod +x inshpect
mv inshpect /usr/local/bin/inshpect
popd
- name: Checkout
uses: actions/checkout@v4
- name: Inshpect
if: always()
run: |
export INSHPECT_NUMTHREADS=4
export INSHPECT_FD=fdfind
inshpect . .inshpect.toml
Loading

0 comments on commit 11ff21f

Please sign in to comment.