[PATCH] D133119: [clang-tidy] Add checker 'bugprone-suspicious-realloc-usage'.

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 3 02:27:00 PDT 2022


martong accepted this revision.
martong added a comment.

In D133119#3827432 <https://reviews.llvm.org/D133119#3827432>, @balazske wrote:

> I added a simple detection of create a copy of `p` before `p = realloc(p, ...)`. This can remove the warning at very obvious cases when a copy of `p` is created (but even if the copy is made inside an `if` branch for example).

Okay, I am comfortable with this update, even though the recognition of the assignment cannot be fully precise. So, still looks good to me.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133119/new/

https://reviews.llvm.org/D133119



More information about the cfe-commits mailing list