lebedev.ri added a comment. In https://reviews.llvm.org/D33826#868185, @aaron.ballman wrote:
> Ah, I think I'm catching on to the point you're raising (thank you for > the patience). If the return type is void *, we don't have enough > information to sensibly diagnose (not without data flow analysis to > determine where the original value came from, anyway), and if the > return type is not void *, we should be checking the alignment anyway. > > That suggests we don't need the exception in this check at all, unless > we find extant implementations that return something other than void Yes! And, more than that, in some rare cases, when casting the pointer that was *just* returned by `malloc`, i believe we *can* do this check too. (i.e. in `malloc` case, the target type should *not* have bigger alignment requirements than the `_Alignof (max_align_t)`.) Now i have fully explained my concerns :) Repository: rL LLVM https://reviews.llvm.org/D33826 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits