[PATCH] D50447: [clang-tidy] Omit cases where loop variable is not used in loop body in performance-for-range-copy.

Jonas Toth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 11 03:33:33 PDT 2018


JonasToth added a comment.

Could there even be a false positive? In a sense, the variable is never
used, so it does not matter, not?

Am 10.08.2018 um 22:17 schrieb Shuai Wang via Phabricator:

> shuaiwang added a comment.
> 
> In https://reviews.llvm.org/D50447#1194967, @JonasToth wrote:
> 
>> Do you think it is a bad idea? If the variable is not used it is ok to
>> 
>>   ignore it in this particular circumstance. Other warnings/check should
>>   deal with such a situation IMHO.
>> 
>> Am 10.08.2018 um 10:29 schrieb Roman Lebedev via Phabricator:
>> 
>>> lebedev.ri added a comment.
>>> 
>>> It seems this ended up silently being a catch-all, with no option to control this behavior, and i don't see any comments discussing this..
>>> 
>>> Repository:
>>> 
>>>   rL LLVM
>>> 
>>> https://reviews.llvm.org/D50447
> 
> Not sure whether hokein have done that already but I did run through our code base and AFAICT there's no false negative.
> 
> Repository:
> 
>   rL LLVM
> 
> https://reviews.llvm.org/D50447


Repository:
  rL LLVM

https://reviews.llvm.org/D50447





More information about the llvm-commits mailing list