[clang-tidy] Use range-for for check registration. NFC
authorAlexander Kornienko <alexfh@google.com>
Fri, 22 Nov 2019 11:22:40 +0000 (12:22 +0100)
committerAlexander Kornienko <alexfh@google.com>
Tue, 26 Nov 2019 15:34:23 +0000 (16:34 +0100)
Actually, just testing GitHub commit rights.

clang-tools-extra/clang-tidy/ClangTidy.cpp

index 91e8ebe..40aaf40 100644 (file)
@@ -314,10 +314,8 @@ ClangTidyASTConsumerFactory::ClangTidyASTConsumerFactory(
     IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem> OverlayFS)
     : Context(Context), OverlayFS(OverlayFS),
       CheckFactories(new ClangTidyCheckFactories) {
-  for (ClangTidyModuleRegistry::iterator I = ClangTidyModuleRegistry::begin(),
-                                         E = ClangTidyModuleRegistry::end();
-       I != E; ++I) {
-    std::unique_ptr<ClangTidyModule> Module(I->instantiate());
+  for (ClangTidyModuleRegistry::entry E : ClangTidyModuleRegistry::entries()) {
+    std::unique_ptr<ClangTidyModule> Module = E.instantiate();
     Module->addCheckFactories(*CheckFactories);
   }
 }