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

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 30 08:55:18 PDT 2022


balazske marked an inline comment as done.
balazske added a comment.

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).


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