Skip to content

Commit 8d0a112

Browse files
committed
Bump jaulib and adopt to clang-18
1 parent 3538341 commit 8d0a112

File tree

6 files changed

+154
-90
lines changed

6 files changed

+154
-90
lines changed

.clang-format

Lines changed: 138 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,98 @@
1+
# clang-format 18
2+
# https://clang-format-configurator.site/
13
---
2-
Language: Cpp
3-
# BasedOnStyle: Google
4-
AccessModifierOffset: -1
4+
Language: Cpp
5+
AccessModifierOffset: -2
56
AlignAfterOpenBracket: Align
67
AlignArrayOfStructures: None
7-
AlignConsecutiveMacros: None
8-
AlignConsecutiveAssignments: None
9-
AlignConsecutiveBitFields: None
10-
AlignConsecutiveDeclarations: None
8+
AlignConsecutiveDeclarations:
9+
Enabled: true
10+
AcrossEmptyLines: false
11+
AcrossComments: true
12+
AlignCompound: true
13+
PadOperators: true
14+
AlignFunctionPointers: true
15+
AlignConsecutiveAssignments:
16+
Enabled: true
17+
AcrossEmptyLines: false
18+
AcrossComments: true
19+
AlignCompound: true
20+
PadOperators: true
21+
AlignFunctionPointers: true
22+
AlignConsecutiveBitFields:
23+
Enabled: true
24+
AcrossEmptyLines: false
25+
AcrossComments: true
26+
AlignCompound: true
27+
PadOperators: true
28+
AlignFunctionPointers: true
29+
AlignConsecutiveMacros:
30+
Enabled: true
31+
AcrossEmptyLines: false
32+
AcrossComments: true
33+
AlignCompound: true
34+
PadOperators: true
35+
AlignFunctionPointers: true
1136
AlignEscapedNewlines: Left
12-
AlignOperands: Align
37+
AlignOperands: Align
1338
AlignTrailingComments: true
1439
AllowAllArgumentsOnNextLine: true
1540
AllowAllConstructorInitializersOnNextLine: true
1641
AllowAllParametersOfDeclarationOnNextLine: true
1742
AllowShortEnumsOnASingleLine: true
18-
AllowShortBlocksOnASingleLine: Never
19-
AllowShortCaseLabelsOnASingleLine: false
43+
AllowShortBlocksOnASingleLine: Always
44+
AllowShortCaseLabelsOnASingleLine: true
2045
AllowShortFunctionsOnASingleLine: All
2146
AllowShortLambdasOnASingleLine: All
2247
AllowShortIfStatementsOnASingleLine: WithoutElse
2348
AllowShortLoopsOnASingleLine: true
2449
AlwaysBreakAfterDefinitionReturnType: None
2550
AlwaysBreakAfterReturnType: None
26-
AlwaysBreakBeforeMultilineStrings: true
51+
AlwaysBreakBeforeMultilineStrings: false
2752
AlwaysBreakTemplateDeclarations: Yes
2853
AttributeMacros:
2954
- __capability
3055
BinPackArguments: true
3156
BinPackParameters: true
3257
BraceWrapping:
33-
AfterCaseLabel: false
34-
AfterClass: false
58+
AfterCaseLabel: false
59+
AfterClass: false
3560
AfterControlStatement: Never
36-
AfterEnum: false
37-
AfterFunction: true
38-
AfterNamespace: false
61+
AfterEnum: false
62+
AfterFunction: false
63+
AfterNamespace: false
3964
AfterObjCDeclaration: false
40-
AfterStruct: false
41-
AfterUnion: false
65+
AfterStruct: false
66+
AfterUnion: false
4267
AfterExternBlock: false
43-
BeforeCatch: false
44-
BeforeElse: false
68+
BeforeCatch: false
69+
BeforeElse: false
4570
BeforeLambdaBody: false
46-
BeforeWhile: false
47-
IndentBraces: false
48-
SplitEmptyFunction: true
49-
SplitEmptyRecord: true
50-
SplitEmptyNamespace: true
71+
BeforeWhile: false
72+
IndentBraces: false
73+
SplitEmptyFunction: false
74+
SplitEmptyRecord: false
75+
SplitEmptyNamespace: false
5176
BreakBeforeBinaryOperators: None
52-
BreakBeforeConceptDeclarations: true
53-
BreakBeforeBraces: Attach
77+
BreakBeforeConceptDeclarations: Always
78+
BreakBeforeBraces: Custom
5479
BreakBeforeInheritanceComma: false
55-
BreakInheritanceList: BeforeColon
80+
BreakInheritanceList: AfterComma
5681
BreakBeforeTernaryOperators: true
5782
BreakConstructorInitializersBeforeComma: false
5883
BreakConstructorInitializers: BeforeColon
5984
BreakAfterJavaFieldAnnotations: false
6085
BreakStringLiterals: true
61-
ColumnLimit: 0
62-
CommentPragmas: '^ IWYU pragma:'
86+
ColumnLimit: 0
87+
CommentPragmas: "^ IWYU pragma:"
6388
CompactNamespaces: false
6489
ConstructorInitializerAllOnOneLineOrOnePerLine: true
6590
ConstructorInitializerIndentWidth: 0
66-
ContinuationIndentWidth: 4
91+
ContinuationIndentWidth: 0
6792
Cpp11BracedListStyle: false
6893
DeriveLineEnding: true
6994
DerivePointerAlignment: true
70-
DisableFormat: false
95+
DisableFormat: false
7196
EmptyLineAfterAccessModifier: Never
7297
EmptyLineBeforeAccessModifier: Always
7398
ExperimentalAutoDetectBinPacking: false
@@ -78,42 +103,42 @@ ForEachMacros:
78103
- BOOST_FOREACH
79104
IfMacros:
80105
- KJ_IF_MAYBE
81-
IncludeBlocks: Regroup
106+
IncludeBlocks: Regroup
82107
IncludeCategories:
83-
- Regex: '^<ext/.*\.h>'
84-
Priority: 2
85-
SortPriority: 0
86-
CaseSensitive: false
87-
- Regex: '^<.*\.h>'
88-
Priority: 1
89-
SortPriority: 0
90-
CaseSensitive: false
91-
- Regex: '^<.*'
92-
Priority: 2
93-
SortPriority: 0
94-
CaseSensitive: false
95-
- Regex: '.*'
96-
Priority: 3
97-
SortPriority: 0
98-
CaseSensitive: false
99-
IncludeIsMainRegex: '([-_](test|unittest))?$'
100-
IncludeIsMainSourceRegex: ''
101-
IndentAccessModifiers: true
108+
- Regex: ^<ext/.*
109+
Priority: 5
110+
CaseSensitive: false
111+
- Regex: ^<jau/.*
112+
Priority: 4
113+
CaseSensitive: false
114+
- Regex: ^<.*\.h>
115+
Priority: 1
116+
CaseSensitive: false
117+
- Regex: ^<.*
118+
Priority: 2
119+
CaseSensitive: false
120+
- Regex: .*
121+
Priority: 3
122+
CaseSensitive: false
123+
IncludeIsMainRegex: ([-_](test|unittest))?$
124+
IncludeIsMainSourceRegex: ""
125+
IndentAccessModifiers: false
102126
IndentCaseLabels: true
103127
IndentCaseBlocks: false
104128
IndentGotoLabels: true
105-
IndentPPDirectives: None
129+
IndentPPDirectives: BeforeHash
106130
IndentExternBlock: Indent
107-
IndentRequires: true
108-
IndentWidth: 4
131+
IndentRequires: true
132+
IndentRequiresClause: true
133+
IndentWidth: 4
109134
IndentWrappedFunctionNames: false
110135
InsertTrailingCommas: None
111136
JavaScriptQuotes: Leave
112137
JavaScriptWrapImports: true
113138
KeepEmptyLinesAtTheStartOfBlocks: false
114139
LambdaBodyIndentation: Signature
115-
MacroBlockBegin: ''
116-
MacroBlockEnd: ''
140+
MacroBlockBegin: ""
141+
MacroBlockEnd: ""
117142
MaxEmptyLinesToKeep: 1
118143
NamespaceIndentation: All
119144
ObjCBinPackProtocolList: Never
@@ -127,24 +152,24 @@ PenaltyBreakComment: 300
127152
PenaltyBreakFirstLessLess: 120
128153
PenaltyBreakString: 1000
129154
PenaltyBreakTemplateDeclaration: 10
130-
PenaltyExcessCharacter: 1000000
131-
PenaltyReturnTypeOnItsOwnLine: 200
155+
PenaltyExcessCharacter: 1000
156+
PenaltyReturnTypeOnItsOwnLine: 10000
132157
PenaltyIndentedWhitespace: 0
133-
PointerAlignment: Left
134-
PPIndentWidth: -1
158+
PointerAlignment: Right
159+
PPIndentWidth: -1
135160
RawStringFormats:
136-
- Language: Cpp
161+
- Language: Cpp
137162
Delimiters:
138163
- cc
139164
- CC
140165
- cpp
141166
- Cpp
142167
- CPP
143-
- 'c++'
144-
- 'C++'
145-
CanonicalDelimiter: ''
146-
BasedOnStyle: google
147-
- Language: TextProto
168+
- c++
169+
- C++
170+
CanonicalDelimiter: ""
171+
BasedOnStyle: google
172+
- Language: TextProto
148173
Delimiters:
149174
- pb
150175
- PB
@@ -161,14 +186,13 @@ RawStringFormats:
161186
- ParseTestProto
162187
- ParsePartialTestProto
163188
CanonicalDelimiter: pb
164-
BasedOnStyle: google
189+
BasedOnStyle: google
165190
ReferenceAlignment: Pointer
166-
ReflowComments: true
191+
ReflowComments: true
167192
ShortNamespaceLines: 1
168-
# SortIncludes: CaseSensitive
169-
SortIncludes: Never
193+
SortIncludes: CaseSensitive
170194
SortJavaStaticImport: Before
171-
SortUsingDeclarations: true
195+
SortUsingDeclarations: LexicographicNumeric
172196
SpaceAfterCStyleCast: false
173197
SpaceAfterLogicalNot: false
174198
SpaceAfterTemplateKeyword: true
@@ -177,37 +201,67 @@ SpaceBeforeCaseColon: false
177201
SpaceBeforeCpp11BracedList: false
178202
SpaceBeforeCtorInitializerColon: false
179203
SpaceBeforeInheritanceColon: true
180-
SpaceBeforeParens: ControlStatements
204+
SpaceBeforeParens: Custom
181205
SpaceAroundPointerQualifiers: Default
182206
SpaceBeforeRangeBasedForLoopColon: true
183-
SpaceInEmptyBlock: false
207+
SpaceInEmptyBlock: true
184208
SpaceInEmptyParentheses: false
185209
SpacesBeforeTrailingComments: 2
186-
SpacesInAngles: Never
210+
SpacesInAngles: Never
187211
SpacesInConditionalStatement: false
188212
SpacesInContainerLiterals: true
189213
SpacesInCStyleCastParentheses: false
190214
SpacesInLineCommentPrefix:
191-
Minimum: 1
192-
Maximum: -1
193-
SpacesInParentheses: false
215+
Minimum: 1
216+
Maximum: -1
217+
SpacesInParentheses: true
194218
SpacesInSquareBrackets: false
195219
SpaceBeforeSquareBrackets: false
196220
BitFieldColonSpacing: Both
197-
Standard: Auto
221+
Standard: Auto
198222
StatementAttributeLikeMacros:
199223
- Q_EMIT
200224
StatementMacros:
201225
- Q_UNUSED
202226
- QT_REQUIRE_VERSION
203-
TabWidth: 4
204-
UseCRLF: false
205-
UseTab: Never
227+
TabWidth: 4
228+
UseCRLF: false
229+
UseTab: Never
206230
WhitespaceSensitiveMacros:
207231
- STRINGIZE
208232
- PP_STRINGIZE
209233
- BOOST_PP_STRINGIZE
210234
- NS_SWIFT_NAME
211235
- CF_SWIFT_NAME
212-
...
213-
236+
SpaceBeforeParensOptions:
237+
AfterControlStatements: false
238+
AfterForeachMacros: false
239+
AfterFunctionDeclarationName: false
240+
AfterFunctionDefinitionName: false
241+
AfterIfMacros: false
242+
AfterOverloadedOperator: false
243+
AfterRequiresInClause: false
244+
AfterRequiresInExpression: false
245+
BeforeNonEmptyParentheses: false
246+
AfterPlacementOperator: false
247+
SpacesInParens: Custom
248+
SpacesInParensOptions:
249+
InConditionalStatements: true
250+
InCStyleCasts: false
251+
InEmptyParentheses: false
252+
Other: false
253+
AlignConsecutiveShortCaseStatements:
254+
Enabled: true
255+
AcrossEmptyLines: false
256+
AcrossComments: true
257+
AlignCaseColons: false
258+
AllowBreakBeforeNoexceptSpecifier: Never
259+
AllowShortCompoundRequirementOnASingleLine: true
260+
InsertNewlineAtEOF: true
261+
PenaltyBreakOpenParenthesis: 500
262+
PenaltyBreakScopeResolution: 500
263+
QualifierAlignment: Leave
264+
RequiresClausePosition: OwnLine
265+
RequiresExpressionIndentation: OuterScope
266+
SeparateDefinitionBlocks: Leave
267+
SpaceBeforeJsonColon: true

.clang-tidy

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
Checks: 'clang-diagnostic-*, clang-analyzer-*,
22
modernize-*, bugprone-*, performance-*,
3+
-bugprone-reserved-identifier, -bugprone-easily-swappable-parameters, -bugprone-assignment-in-if-condition,
4+
-bugprone-misplaced-widening-cast, -bugprone-branch-clone,
35
-clang-diagnostic-unknown-warning-option,
46
-clang-analyzer-security.insecureAPI.bzero,
7+
-clang-analyzer-optin.core.EnumCastOutOfRange,
58
-modernize-use-auto, -modernize-use-nodiscard, -modernize-use-using, -modernize-use-trailing-return-type,
69
-modernize-avoid-c-arrays, -modernize-use-default-member-init, -modernize-return-braced-init-list,
710
-modernize-avoid-bind, -modernize-use-transparent-functors,
8-
-bugprone-reserved-identifier, -bugprone-easily-swappable-parameters, -bugprone-assignment-in-if-condition,
9-
-bugprone-misplaced-widening-cast, -bugprone-branch-clone'
11+
-modernize-use-constraints,
12+
-performance-avoid-endl, -performance-enum-size'
1013

1114
CheckOptions:
1215
- key: modernize-use-default-member-init.UseAssignment
1316
value: 'true'
1417

1518
WarningsAsErrors: '*'
16-
HeaderFilterRegex: '(include/pixel/.*)\.hpp'
17-
AnalyzeTemporaryDtors: false
19+
HeaderFilterRegex: '(include/gamp/.*|jaulib/include/jau/[a-zA-Z0-0]*)\.hpp'
20+
# AnalyzeTemporaryDtors: false
1821
FormatStyle: none
1922
InheritParentConfig: false
2023
User: sven

clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.clang-format

include/gamp/gamp.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#define JAU_GAMP_HPP_
2626

2727
#include <gamp/gamp_types.hpp>
28+
#include <gamp/version.hpp>
2829

2930
/**
3031
* Basic computer graphics math and utilities helping with the framebuffer and I/O tooling.

jaulib

Submodule jaulib updated 66 files

0 commit comments

Comments
 (0)