I started to work on bug 32823 "Warn about accidental coping of data in
range based for" [1] and quickly discovered the feature request was
already done when using the -Wrange-loop-analysis compiler option.
Since the -Wfor-loop-analysis is already part of -Wall I feel
-Wrange-loop-analysis should also be part of -Wall. If this is wanted I
post the attached patch to the Phabricator.
[1] 32823 – Warn about accidental coping of data in range based for
Regards,
Mark de Wever
32823.patch (508 Bytes)