Author: Alexander Kornienko Date: 2019-11-26T16:34:23+01:00 New Revision: aa0e92e1f7069834852c08fdd32a92258e30555c
URL: https://github.com/llvm/llvm-project/commit/aa0e92e1f7069834852c08fdd32a92258e30555c DIFF: https://github.com/llvm/llvm-project/commit/aa0e92e1f7069834852c08fdd32a92258e30555c.diff LOG: [clang-tidy] Use range-for for check registration. NFC Actually, just testing GitHub commit rights. Added: Modified: clang-tools-extra/clang-tidy/ClangTidy.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clang-tidy/ClangTidy.cpp b/clang-tools-extra/clang-tidy/ClangTidy.cpp index 91e8ebee1368..40aaf402ec0e 100644 --- a/clang-tools-extra/clang-tidy/ClangTidy.cpp +++ b/clang-tools-extra/clang-tidy/ClangTidy.cpp @@ -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); } } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits