This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Fix unused-variable warning after r361647.
ClosedPublic

Authored by ymandel on May 24 2019, 11:06 AM.

Details

Summary

A range-for was added in r361647 where the range variable was only used in an
assertion. As a result, it warned for Release builds. This revision
restructures the assertion to avoid the problem.

Diff Detail

Event Timeline

ymandel created this revision.May 24 2019, 11:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 24 2019, 11:06 AM
ymandel retitled this revision from [LibTooling] Fix unused-variable warning after r361647. to [clang-tidy] Fix unused-variable warning after r361647..May 24 2019, 11:07 AM
ymandel edited projects, added Restricted Project; removed Restricted Project.May 24 2019, 11:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 24 2019, 11:07 AM
ilya-biryukov accepted this revision.May 27 2019, 12:32 AM

LGTM

clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp
21 ↗(On Diff #201289)

NIT: use llvm::all_of avoid typing the container name twice.

This revision is now accepted and ready to land.May 27 2019, 12:32 AM
This revision was automatically updated to reflect the committed changes.
hokein added a subscriber: hokein.May 27 2019, 1:07 AM

I have commit this patch on behalf of @ymandel, as this warning blocks our internal integration.