[clang-tidy] Fix unused-variable warning after r361647.
authorHaojian Wu <hokein@google.com>
Mon, 27 May 2019 08:09:02 +0000 (08:09 +0000)
committerHaojian Wu <hokein@google.com>
Mon, 27 May 2019 08:09:02 +0000 (08:09 +0000)
commitc11de5eada2decd0a495ea02676b6f4838cd54fb
treebb2f9fd9019b3a580a7d3ae13c4659b0e6a5e0a9
parent1d28030f99791c043917faf6066ceba208504627
[clang-tidy] Fix unused-variable warning after r361647.

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.

Patch by Yitzhak Mandelbaum.

Reviewers: ilya-biryukov

Reviewed By: ilya-biryukov

Subscribers: xazax.hun, cfe-commits

Tags: #clang-tools-extra, #clang

Differential Revision: https://reviews.llvm.org/D62412

llvm-svn: 361749
clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp