[PATCH] D80536: [clang-tidy][modernize-loop-convert] Make loop var type human readable

Zinovy Nis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 26 23:22:50 PDT 2020


zinovy.nis added a comment.

In D80536#2055500 <https://reviews.llvm.org/D80536#2055500>, @njames93 wrote:

> I'm having trouble with the reproduction of this - https://godbolt.org/z/tsMfcj.
>  Aside from that this needs some test cases to demonstrate the patch is indeed working


Thanks. Seems like the reproduction is c++-library dependent. Please look at https://godbolt.org/z/tbGG9b where I have manually "emulated" std::set. Or just change compiler to "clang-tidy (trunk) #1 with x86-64 clang (std::embed)" in your sample.
I get the same result (as for my custom "class set") for std::set on 'master' on Windows 10.

> Aside from that this needs some test cases to demonstrate the patch is indeed working

IMHO, for testing purposes it's enough to apply my change to 'structures.h' (int -> value_type)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80536





More information about the cfe-commits mailing list