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

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 4 07:49:09 PST 2019


Eugene.Zelenko added a comment.

In D71001#1768964 <https://reviews.llvm.org/D71001#1768964>, @baloghadamsoftware wrote:

> 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];`?


I meant both new and new[].


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