[clang-tools-extra] Add bugprone-sprintf-argument-overlap (PR #114244)

Carlos Galvez via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 6 14:43:02 PST 2025


carlosgalvezp wrote:

Sorry for the late review, but isn't this already covered by `-Wall` with GCC? At least the example from the check documentation:

https://godbolt.org/z/es37ozqe9

```
warning: 'sprintf' argument 3 overlaps destination object 'buf'
```

If this check is not redundant given the above, it would be good document what the differences are and what failure modes it detects that GCC doesn't.

https://github.com/llvm/llvm-project/pull/114244


More information about the cfe-commits mailing list