NoQ added a comment.

In D143128#4108502 <https://reviews.llvm.org/D143128#4108502>, @ziqingluo-90 
wrote:

> In D143128#4108375 <https://reviews.llvm.org/D143128#4108375>, @NoQ wrote:
>
>> Why do we prefer `DRE.data() + any` to `&DRE.data()[any]`? It could be much 
>> less intrusive this way, and the safety guarantees are the same.
>
> It is actually `(DRE.data() + any)` versus `&DRE.data()[any]`. Are they quite 
> the same in terms of being intrusive?

They may be equally verbose but I think the latter looks much more similar to 
the original code in terms of shape. This could be valuable because there's 
probably a reason why the programmer preferred to write it that way. Or even if 
there wasn't any reason, the users still may find it surprising that we change 
the shape for no apparent reason.


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

https://reviews.llvm.org/D143128

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

Reply via email to