This is an archive of the discontinued LLVM Phabricator instance.

[Clang-tidy] Fix copy-paste error in misc-redundant-expression detected by PVS-Studio
ClosedPublic

Authored by Eugene.Zelenko on Oct 31 2016, 5:38 PM.

Details

Summary

Unfortunately, misc-redundant-expression didn't detect problem in own code.

I also fixed some Include What You Use and modernize-use-bool-literals warnings.

See http://www.viva64.com/en/b/0446/ for full article about problems found in LLVM code by PVS-Studio.

Diff Detail

Repository
rL LLVM

Event Timeline

Eugene.Zelenko retitled this revision from to [Clang-tidy] Fix copy-paste error in misc-redundant-expression detected by PVS-Studio.
Eugene.Zelenko updated this object.
Eugene.Zelenko set the repository for this revision to rL LLVM.
Eugene.Zelenko added subscribers: cfe-commits, Prazek.
aaron.ballman accepted this revision.Nov 1 2016, 11:26 AM
aaron.ballman edited edge metadata.

These changes all look good to me, but it would be best to split the commit into three parts: one for include what you use, one for modernize-use-bool-literals, and one for the copy pasta error. Keeping the changes logically separate helps in case we need to roll any particular change back for some reason (same is true for similar patches in the future; they should probably be multiple patch requests).

This revision is now accepted and ready to land.Nov 1 2016, 11:26 AM
This revision was automatically updated to reflect the committed changes.