DennisL marked 12 inline comments as done.
DennisL added a comment.

In D60139#1460233 <>, @JonasToth wrote:

> Hey Dennis,
> my 2cents on the check. I think it is very good to have! Did you check coding 
> guidelines if they say something to this issue? (e.g. cppcoreguidelines, 
> hicpp, cert) As we have modules for them it would be great to make aliases to 
> this check if they demand this to be checked.

Thanks for the great suggestions. Updated the diff according to the feedback. 
Also checked with cppcoreguidelines, hicpp as well as cert. Only cert has a 
related, yet different rule 
 stating that calls to placement new shall be provided with properly aligned 
pointers. I'd say this should be a distinct check. Happy to work on it after 
this one.

Comment at: clang-tidy/bugprone/PlacementNewTargetTypeMismatch.cpp:42
+  assert((Cast->getSubExpr()->getType()->isPointerType() ||
+         Cast->getSubExpr()->getType()->isArrayType()) &&
JonasToth wrote:
> Is this universally true? What about the nothrow-overload, would that 
> interfere?
Thanks, rewrote that check.


cfe-commits mailing list

Reply via email to