aaron.ballman added a comment.

In D126186#3530938 <https://reviews.llvm.org/D126186#3530938>, @njames93 wrote:

> As a side point I'm not sure this change really follows what the rule is 
> trying to enforce. The rule is about not using std::memset to reinitialise 
> objects that aren't trivial. Having said that limiting it to only 0 does seem 
> a little restrictive,

I think this change makes sense for the rule as it's written, per "Do not use 
std::memset() to initialize an object of nontrivial class type as it may not 
properly initialize the value representation of the object." The noncompliant 
example was using zero initialization, but there's nothing inherently special 
about `0` except for how commonly used it is as a default value.


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

https://reviews.llvm.org/D126186

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to