EricWF added a comment.

In https://reviews.llvm.org/D28716#646274, @grandinj wrote:

> would it be better to internally treat __attribute__((non_null)) like 
> diagnose_if ? then you get all the warnings for free?


There were previous objections about using `non_null` within libc++ due to the 
affect on code gen. That's why I choose to use diagose_if here.
However the previous objections weren't about `std::string`, so maybe the 
consensus would be different here? I'll ping @mclow.lists about this.

Note: Some of these non-null diagnostics depend on the second condition `size > 
0`, which can't be done with non-null.


https://reviews.llvm.org/D28716



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

Reply via email to