From 16ac6cebcfb58ef80cb708cca2ce5994cf64abdb Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Wed, 5 Mar 2014 13:14:32 +0000 Subject: Added a module for checks not related to LLVM or Google coding style. llvm-svn: 202970 --- clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp') diff --git a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp index 68b37ca74db..e130d13930d 100644 --- a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp +++ b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp @@ -47,11 +47,9 @@ int main(int argc, const char **argv) { // FIXME: Allow using --list-checks without positional arguments. if (ListChecks) { - std::vector CheckNames = - clang::tidy::getCheckNames(Checks, DisableChecks); llvm::outs() << "Enabled checks:"; - for (unsigned i = 0; i < CheckNames.size(); ++i) - llvm::outs() << "\n " << CheckNames[i]; + for (auto CheckName : clang::tidy::getCheckNames(Checks, DisableChecks)) + llvm::outs() << "\n " << CheckName; llvm::outs() << "\n\n"; return 0; } @@ -76,5 +74,9 @@ static int LLVMModuleAnchorDestination = LLVMModuleAnchorSource; extern volatile int GoogleModuleAnchorSource; static int GoogleModuleAnchorDestination = GoogleModuleAnchorSource; +// This anchor is used to force the linker to link the MiscModule. +extern volatile int MiscModuleAnchorSource; +static int MiscModuleAnchorDestination = MiscModuleAnchorSource; + } // namespace tidy } // namespace clang -- cgit v1.2.3