[SERVER-79409] Enable bugprone-sizeof-expression clang-tidy check Created: 27/Jul/23 Updated: 27/Aug/23 Resolved: 15/Aug/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Alex Neben | Assignee: | Zack Winter |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Server Development Platform
|
| Participants: |
| Description |
|
|
| Comments |
| Comment by Zack Winter [ 15/Aug/23 ] |
|
Currently this linter rule has too many false positives. Specifically, it throws a warning on sizeof(pointer) to try to prevent sizeof on aggregate types. Using sizeof this way is valid in many cases. It also throws this warning on generics that call sizeof on pointers, which is very annoying since a new instantiation of a generic may trigger a false positive in the generic itself. Revisit when we can disable WarnOnSizeOfPointerToAggregate in a future LLVM version. See https://github.com/10gen/mongo/pull/14772 for more information |