[config] Add labels for new clang 23 checkers#4821
Open
gamesh411 wants to merge 16 commits intoEricsson:masterfrom
Open
[config] Add labels for new clang 23 checkers#4821gamesh411 wants to merge 16 commits intoEricsson:masterfrom
gamesh411 wants to merge 16 commits intoEricsson:masterfrom
Conversation
Add labels for new ClangSA and Clang-Tidy checkers/checks/diagnostics introduced in Clang 23. Assignments are based on a comparison of result counts across 17 Open-Source projects and follow the conventions already in place.
dkrupp
requested changes
Apr 28, 2026
Member
dkrupp
left a comment
There was a problem hiding this comment.
This is a massive change. I made a few comments.
I was not sure wether in the open-source execution the new warnings were enabled or not.
For warnings my logic would be to enable warnings that are enabled by clang by default. If a group of warnings is enabled by default then we should enable all its members by default.
Also cppcheck warnings were not enabled, so it is difficult to see the quality of the checkers to decide about inclusion in the deafault profile.
| "doc_url:https://clang.llvm.org/docs/DiagnosticsReference.html#whip-only", | ||
| "severity:MEDIUM" | ||
| ], | ||
| "clang-diagnostic-hlsl-explicit-binding": [ |
Member
There was a problem hiding this comment.
add to default as this warning is enabled by default in clang
Contributor
Author
There was a problem hiding this comment.
This is shader-api related, probably does not hurt.
- abseil-unchecked-statusor-access: STYLE → HIGH (unchecked access → UB/crash) - bugprone-exception-copy-constructor-throws: MEDIUM → HIGH (throw during unwinding → std::terminate) - bugprone-unsafe-to-allow-exceptions: MEDIUM → HIGH (throw from dtor/move → UB/terminate)
| bugprone-random-generator-seed | sei-cert-c:msc30-c, sei-cert-cpp:msc50-cpp |⚠️ Questionable | Doc references MSC51-CPP and MSC32-C, not MSC30-C and MSC50-CPP. MSC30-C is about rand() itself, not seeding. MSC50-CPP is also about rand(). The checker is about seeding, which maps to MSC32-C/MSC51-CPP.
bugprone-default-operator-new-on-overaligned-type — HIGH severity, very precise (only fires on over-aligned types with default operator new). Should include default. bugprone-exception-copy-constructor-throws — HIGH severity (fixed), precise (only fires on exception types with throwing copy ctors). Should include default. bugprone-unsafe-to-allow-exceptions — HIGH severity (fixed), precise (only fires on explicit noexcept(false) on dtors/move/swap). Should include default.
| Warning | Enabled by default? | Currently in default profile? | Action needed? | |---------|---------------------|-------------------------------|----------------| | -Wenum-compare-typo | ✅ Yes | Yes | ✅ OK | | -Wgroupshared-initializer | ✅ Yes (error by default) | Yes |⚠️ But HLSL-specific — should be removed per platform exclusion rule | | -Whlsl-explicit-binding | ✅ Yes | Yes |⚠️ HLSL-specific — should be removed per platform exclusion rule | | -Wimplicit-overflow-behavior-conversion | ❌ No (no "enabled by default" text) | Yes | ❌ Remove | | -Wimplicit-overflow-behavior-conversion-assignment | ❌ No | Yes | ❌ Remove | | -Wimplicit-overflow-behavior-conversion-assignment-pedantic | ❌ No | Yes | ❌ Remove | | -Wimplicit-overflow-behavior-conversion-function-boundary | ❌ No | Yes | ❌ Remove | | -Wimplicit-overflow-behavior-conversion-function-boundary-pedantic | ❌ No | Yes | ❌ Remove | | -Wimplicit-overflow-behavior-conversion-pedantic | ❌ No | Yes | ❌ Remove | | -Wincompatible-pointer-types-discards-overflow-behavior | ✅ Yes | Yes | ✅ OK | | -Wlifetime-safety-dangling-field | ❌ No (opt-in via -Wlifetime-safety) | Yes | ❌ Remove | | -Wlifetime-safety-dangling-global | ❌ No | Yes | ❌ Remove | | -Wlifetime-safety-return-stack-addr | ❌ No | Yes | ❌ Remove | | -Wlifetime-safety-use-after-scope | ❌ No | Yes | ❌ Remove | | -Wmatrix-conversion | ✅ Yes | Yes | ✅ OK | Also: -Wgroupshared-initializer and -Whlsl-explicit-binding are HLSL-specific (non-linux platform), so per the updated profile rules they should be excluded from default/sensitive.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add labels for new ClangSA and Clang-Tidy checkers/checks/diagnostics introduced in Clang 23.
Assignments are based on a comparison of result counts across 17 Open-Source projects and follow the conventions already in place.