[PATCH] D87683: [clang-tidy] Crash fix for bugprone-misplaced-pointer-arithmetic-in-alloc

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 15 10:03:57 PDT 2020


baloghadamsoftware added a comment.

In D87683#2274569 <https://reviews.llvm.org/D87683#2274569>, @njames93 wrote:

> Please fix the test case first, can't call `operator new(unsigned long, void*)` with an argument of type `void*`
> The other failures the pre merge bot detected can safely be disregarded

Placement new is defined per standard:

  void* operator new  ( std::size_t count, void* ptr );

Here, the problem is that `size_t` is `unsigned long` on //Linux// and it seems that it is `unsigned long long` on //Windows//. How should I overcome this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87683



More information about the cfe-commits mailing list