summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLib
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-18 18:11:19 (GMT)
committerBrad King <brad.king@kitware.com>2017-09-19 13:32:25 (GMT)
commit706b37b7f597f449cc3d02bd50123c4e7277eadb (patch)
treebbb9c41b56c4205e8c28578f8b13ee6aa4ad0825 /Tests/CMakeLib
parent4547d9a83030f8ae7e636cef16a261c65e6feb40 (diff)
downloadCMake-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/CMakeLib')
-rw-r--r--Tests/CMakeLib/run_compile_commands.cxx9
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);