Added a module for checks not related to LLVM or Google coding style.
llvm-svn: 202970
diff --git a/clang-tools-extra/clang-tidy/tool/CMakeLists.txt b/clang-tools-extra/clang-tidy/tool/CMakeLists.txt
index 72df967..a4f2085 100644
--- a/clang-tools-extra/clang-tidy/tool/CMakeLists.txt
+++ b/clang-tools-extra/clang-tidy/tool/CMakeLists.txt
@@ -11,6 +11,7 @@
clangTidy
clangTidyGoogleModule
clangTidyLLVMModule
+ clangTidyMiscModule
clangTooling
)
diff --git a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
index 68b37ca..e130d13 100644
--- a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
+++ b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
@@ -47,11 +47,9 @@
// FIXME: Allow using --list-checks without positional arguments.
if (ListChecks) {
- std::vector<std::string> 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 @@
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
diff --git a/clang-tools-extra/clang-tidy/tool/Makefile b/clang-tools-extra/clang-tidy/tool/Makefile
index 203fcdb..c63e23f 100644
--- a/clang-tools-extra/clang-tidy/tool/Makefile
+++ b/clang-tools-extra/clang-tidy/tool/Makefile
@@ -17,6 +17,7 @@
include $(CLANG_LEVEL)/../../Makefile.config
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
USEDLIBS = clangTidy.a clangTidyLLVMModule.a clangTidyGoogleModule.a \
+ clangTidyMiscModule.a \
clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \
clangStaticAnalyzerCore.a \
clangFormat.a clangASTMatchers.a clangTooling.a clangFrontend.a \