r330068 - [Serialization] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 14 19:36:50 PDT 2018


Also, we only use auto if the type of the variable is clear. Changes like

-  for (ModuleFile &I : llvm::reverse(ModuleMgr)) {
+  for (auto &I : llvm::reverse(ModuleMgr)) {

are not desired.

On Sat, Apr 14, 2018, 11:09 AM Malcolm Parsons via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> On Sat, 14 Apr 2018, 14:16 Kim Gräsman, <kim.grasman at gmail.com> wrote:
>
>> That would be a nice outcome of all the "run-tools-on-llvm" changes if
>> any problems were filed as bugs on the tools. We have a number of them
>> filed on iwyu, and they make for nice, concrete bugs to troubleshoot even
>> if we don't always know how to fix them.
>>
>> For this specific clang-tidy issue, do you have any ideas for how to tell
>> this loop apart from any other? I'm guessing the container is modified
>> while iterating... Or do you mean skip all non-iterator loops?
>>
>
> Non-iterator, mutable container, size checked each iteration.
>
> Clang-tidy could suggest modernisation, but not automatically fix.
>
> --
> Malcolm Parsons
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180415/79eedc01/attachment-0001.html>


More information about the cfe-commits mailing list