This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Fix a compiler warning
ClosedPublic

Authored by xiaoqing_wu on Mar 9 2021, 3:11 PM.

Details

Summary

Fix a warning caused by -Wrange-loop-analysis

Diff Detail

Event Timeline

xiaoqing_wu created this revision.Mar 9 2021, 3:11 PM
xiaoqing_wu requested review of this revision.Mar 9 2021, 3:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2021, 3:11 PM
xiaoqing_wu retitled this revision from Fix a compiler warning to [NFC] Fix a compiler warning.Mar 9 2021, 3:25 PM
kazu added a comment.Mar 10 2021, 12:44 AM

May I ask which cpp file you see the warning in? I just built clang and llvm, but I wasn't able to reproduce the warning. Thanks!

It shows up in those source files that include SetOperations.h, for example: llvm/lib/CodeGen/MachineLoopInfo.cpp.

We found that this warning showed up in certain versions of clang, but not in some other versions. Since this is a legit warning, we thought it's better to fix it.

qcolombet accepted this revision.Mar 10 2021, 10:44 AM
This revision is now accepted and ready to land.Mar 10 2021, 10:44 AM
This revision was landed with ongoing or failed builds.Mar 10 2021, 1:30 PM
This revision was automatically updated to reflect the committed changes.