diff options
author | Brad King <brad.king@kitware.com> | 2017-09-18 18:11:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-09-19 13:32:25 (GMT) |
commit | 706b37b7f597f449cc3d02bd50123c4e7277eadb (patch) | |
tree | bbb9c41b56c4205e8c28578f8b13ee6aa4ad0825 /Tests | |
parent | 4547d9a83030f8ae7e636cef16a261c65e6feb40 (diff) | |
download | CMake-706b37b7f597f449cc3d02bd50123c4e7277eadb.zip CMake-706b37b7f597f449cc3d02bd50123c4e7277eadb.tar.gz CMake-706b37b7f597f449cc3d02bd50123c4e7277eadb.tar.bz2 |
Enable clang-tidy modernize-loop-convert lint
Fix remaining diagnostics by this lint and remove it from our list of
disabled lints.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLib/run_compile_commands.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx index 0d692ca..b49803b 100644 --- a/Tests/CMakeLib/run_compile_commands.cxx +++ b/Tests/CMakeLib/run_compile_commands.cxx @@ -144,14 +144,11 @@ int main() cmsys::ifstream file("compile_commands.json"); CompileCommandParser parser(file); parser.Parse(); - for (CompileCommandParser::TranslationUnitsType::const_iterator - it = parser.GetTranslationUnits().begin(), - end = parser.GetTranslationUnits().end(); - it != end; ++it) { + for (auto const& tu : parser.GetTranslationUnits()) { std::vector<std::string> command; - cmSystemTools::ParseUnixCommandLine(it->at("command").c_str(), command); + cmSystemTools::ParseUnixCommandLine(tu.at("command").c_str(), command); if (!cmSystemTools::RunSingleCommand(command, nullptr, nullptr, nullptr, - it->at("directory").c_str())) { + tu.at("directory").c_str())) { std::cout << "ERROR: Failed to run command \"" << command[0] << "\"" << std::endl; exit(1); |