aaron.ballman added a comment.

In D110656#3034083 <https://reviews.llvm.org/D110656#3034083>, @xbolva00 wrote:
> Why just no special case "= {0};" pattern and do not warn in that case?

This was what I was thinking. I was basing that on the idea that `= { 0 }` to 
zero init the entire array is far more common than ` = { 1 }` to init the first 
element to one and the rest to zero (which is a case I think this diagnostic 
shines on because some users think that will fill all `1` instead of only the 
first element).

> If there are more patterns, take it from other side - pick patterns where you 
> are sure that they are wrong and developer needs to fix them and emit 
> warnings for them.

If there are other patterns, I'd love to know what they are.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110656

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

Reply via email to