venk-ks wrote:

Quick heads-up: #204337 (`fread`/`fwrite`/`fgets`) just landed on `main` and 
touched `checkFortifiedBuiltinMemoryFunction` in two ways that affect this PR 
on rebase:

1. `SourceSize` and `DestinationSize` in `checkFortifiedBuiltinMemoryFunction` 
were renamed to `AccessSize` and `BufferSize`.
2. It added `diag::warn_fortify_source_overread` (`InGroup<FortifySource>`, 
used by `fwrite`). Instead of calling `Checker.checkSourceOverread(1, 2)` 
(which emits `-Wstringop-overread`), `write`, `pwrite`, and `pwrite64` can now 
set:
   ```cpp
   DiagID = diag::warn_fortify_source_overread;
   AccessSize = Checker.ComputeExplicitObjectSizeArgument(2);
   BufferSize = Checker.ComputeSizeArgument(1);
   break;
   ```
   so that their overread warnings are emitted under `-Wfortify-source` as well 
(along with updating the `write`/`pwrite`/`pwrite64` warning expectations in 
the tests and `ReleaseNotes.md`).

https://github.com/llvm/llvm-project/pull/224979
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to