aaron.ballman added a comment.

In D73007#1839648 <https://reviews.llvm.org/D73007#1839648>, @aaronpuchert 
wrote:

> Here is a proposal: we add two children to `-Wrange-loop-analysis`.
>
> - `-Wrange-loop-construct` warns about possibly unintended constructor calls. 
> This might be in `-Wall`. It contains
>   - `warn_for_range_copy`: loop variable A of type B creates a copy from type 
> C
>   - `warn_for_range_const_reference_copy`: loop variable A  is initialized 
> with a value of a different type resulting in a copy
> - `-Wrange-loop-bind-ref[erence]` warns about misleading use of reference 
> types. This might **not** be in `-Wall`. It contains
>   - `warn_for_range_variable_always_copy`: loop variable A is always a copy 
> because the range of type B does not return a reference


I think this seems like a reasonable approach.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73007



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

Reply via email to