[PATCH] D60139: Add clang-tidy/checks/misc-placement-new-target-size check

Dennis Luxen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 2 10:01:40 PDT 2019


DennisL created this revision.
Herald added subscribers: cfe-commits, mgorny.
Herald added a project: clang.

Finds placement-new calls where the size of the pointee type of the placement parameter is smaller than the size of the constructed type and the pointer is implicitly cast to ``void *``


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D60139

Files:
  clang-tidy/misc/CMakeLists.txt
  clang-tidy/misc/MiscTidyModule.cpp
  clang-tidy/misc/PlacementNewTargetSizeCheck.cpp
  clang-tidy/misc/PlacementNewTargetSizeCheck.h
  docs/ReleaseNotes.rst
  docs/clang-tidy/checks/list.rst
  docs/clang-tidy/checks/misc-placement-new-target-size.rst
  test/clang-tidy/misc-placement-new-target-size.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60139.193318.patch
Type: text/x-patch
Size: 7942 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190402/59f51abe/attachment.bin>


More information about the cfe-commits mailing list