[PATCH] D71001: [Clang-Tidy] New check: bugprone-misplaced-pointer-arithmetic-in-alloc

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 4 07:03:27 PST 2019


baloghadamsoftware added a comment.

In D71001#1768704 <https://reviews.llvm.org/D71001#1768704>, @Eugene.Zelenko wrote:

> What about new operator? May be check should have option for custom allocators?


Do you mean `new[]`. Thus e.g. `const *carr = new C[n] + 10;` instead of `const *carr = new C[n + 10];`?


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D71001





More information about the cfe-commits mailing list