Author: alexfh Date: Wed Apr 27 06:45:14 2016 New Revision: 267697 URL: http://llvm.org/viewvc/llvm-project?rev=267697&view=rev Log: clang-tidy -list-checks should exit with non-zero code when no checks are enabled.
Modified: clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp Modified: clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp?rev=267697&r1=267696&r2=267697&view=diff ============================================================================== --- clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp (original) +++ clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp Wed Apr 27 06:45:14 2016 @@ -333,6 +333,10 @@ static int clangTidyMain(int argc, const } if (ListChecks) { + if (EnabledChecks.empty()) { + llvm::errs() << "No checks enabled.\n"; + return 1; + } llvm::outs() << "Enabled checks:"; for (auto CheckName : EnabledChecks) llvm::outs() << "\n " << CheckName; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits