diff options
author | Mark de Wever <koraq@xs4all.nl> | 2020-02-01 18:40:07 +0100 |
---|---|---|
committer | Mark de Wever <koraq@xs4all.nl> | 2020-02-01 18:44:27 +0100 |
commit | c03349e40f21f0375278138992a32694a99c830e (patch) | |
tree | 910c4e25d2e836a6c4b9f105108bc7fcfead5d19 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
parent | 70c98671fa7b395a52829b91782393f4c2613562 (diff) | |
download | llvm-c03349e40f21f0375278138992a32694a99c830e.zip llvm-c03349e40f21f0375278138992a32694a99c830e.tar.gz llvm-c03349e40f21f0375278138992a32694a99c830e.tar.bz2 |
[Sema] Remove a -Wrange warning from -Wall
During the review of D73007 Aaron Puchert mentioned
`warn_for_range_variable_always_copy` shouldn't be part of -Wall since
some coding styles require `for(const auto &bar : bars)`. This warning
would cause false positives for these users. Based on Aaron's proposal
refactored the warnings:
* -Wrange-loop-construct warns about possibly unintended constructor
calls. This is part of -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-reference warns about misleading use of reference
types. This is not part of -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
Differential Revision: https://reviews.llvm.org/D73434
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
0 files changed, 0 insertions, 0 deletions