[SERVER-69729] Enable clang-tidy check for signed char misuse Created: 15/Sep/22 Updated: 29/Oct/23 Resolved: 20/Dec/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Jordi Olivares Provencio | Assignee: | Matt Kneiser |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | post-v4-toolchain | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||
| Sprint: | Execution Team 2022-12-26 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
In ARM CPUs the char datatype is unsigned by default while on x86 it is signed. To avoid misuse we should enable the bugprone-signed-char-misuse clang-tidy check. |
| Comments |
| Comment by Matt Kneiser [ 20/Dec/22 ] |
|
This touches very old code (represent_as), but the scope of the change is narrow. |
| Comment by Githook User [ 20/Dec/22 ] |
|
Author: {'name': 'Matt Kneiser', 'email': 'matt.kneiser@mongodb.com', 'username': 'themattman'}Message: |
| Comment by Alex Neben [ 14/Dec/22 ] |
|
That was absurdly fast! Nice job! |
| Comment by Alex Neben [ 14/Dec/22 ] |
|
FYI: this is now unblocked! |
| Comment by Alex Neben [ 19/Sep/22 ] |
|
The check does not exist in clang tidy 7 which I think is the one we are using in our toolchain |
| Comment by Alex Neben [ 19/Sep/22 ] |
|
This check should not merge until after we upgrade the toolchain. This will prevent us from upgrading the toolchain if there are regressions. If you want to leave this PR our team can make sure this check gets enabled and you can go thru and make all the fixes by using clang-tidy v4 |
| Comment by Matt Kneiser [ 16/Sep/22 ] |
|
Should fix existing uses before enabling the check. |