Skip to content

Commit 479cdcc

Browse files
svenvhdbudanov-cmplr
authored andcommitted
Suppress some clang-tidy errors
Split the .clang-tidy check lists out over multiple lines to improve readability. Suppress `misc-non-private-member-variables-in-classes` as the code currently contains many instances that fail this check. Drop `constexpr` from `LoopControlLoopCountINTELMask` after clang started diagnosing this with b364535 ("[Clang] Diagnose ill-formed constant expression when setting ...", 2022-07-28). Removing `constexpr` is just a workaround, the long term fix would be to upstream the new enum value to `spirv.hpp`. Original commit: KhronosGroup/SPIRV-LLVM-Translator@c5b29f2
1 parent 194e0eb commit 479cdcc

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.clang-tidy

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,-misc-no-recursion,readability-identifier-naming'
1+
Checks: |
2+
-*,
3+
clang-diagnostic-*,
4+
llvm-*,
5+
-llvm-header-guard,
6+
misc-*,
7+
-misc-no-recursion,
8+
-misc-non-private-member-variables-in-classes,
9+
-misc-unused-parameters,
10+
readability-identifier-naming
11+
WarningsAsErrors: |
12+
llvm-*,
13+
-llvm-header-guard,
14+
misc-*,
15+
-misc-no-recursion,
16+
-misc-non-private-member-variables-in-classes,
17+
-misc-unused-parameters,
18+
readability-identifier-naming
219
CheckOptions:
320
- key: readability-identifier-naming.ClassCase
421
value: CamelCase
@@ -24,3 +41,5 @@ CheckOptions:
2441
value: 1
2542
- key: modernize-use-default-member-init.UseAssignment
2643
value: 1
44+
- key: llvm-namespace-comment.ShortNamespaceLines
45+
value: '25'

llvm-spirv/lib/SPIRV/libSPIRV/spirv_internal.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ constexpr ExecutionMode ExecutionModeFastCompositeKernelINTEL =
184184
constexpr ExecutionMode ExecutionModeStreamingInterfaceINTEL =
185185
static_cast<ExecutionMode>(IExecModeStreamingInterfaceINTEL);
186186

187-
constexpr LoopControlMask LoopControlLoopCountINTELMask =
187+
static const LoopControlMask LoopControlLoopCountINTELMask =
188188
static_cast<LoopControlMask>(ILoopControlLoopCountINTELMask);
189189

190190
} // namespace internal

0 commit comments

Comments
 (0)