[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
Thu Sep 1 08:44:31 PDT 2022


balazske created this revision.
Herald added subscribers: carlosgalvezp, steakhal, martong, gamesh411, Szelethus, dkrupp, xazax.hun, mgorny.
Herald added a project: All.
balazske requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

Add a check to detect usages of `realloc` where the result is assigned
to the same variable (or field) as passed to the first argument.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133119

Files:
  clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
  clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
  clang-tools-extra/clang-tidy/bugprone/SuspiciousReallocUsageCheck.cpp
  clang-tools-extra/clang-tidy/bugprone/SuspiciousReallocUsageCheck.h
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/bugprone/suspicious-realloc-usage.rst
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-realloc-usage.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133119.457291.patch
Type: text/x-patch
Size: 12241 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220901/f95db1d0/attachment.bin>


More information about the cfe-commits mailing list