summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp10
1 files changed, 6 insertions, 4 deletions
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<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 @@ 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
OpenPOWER on IntegriCloud