Author: Nathan James Date: 2020-06-17T14:35:37+01:00 New Revision: ccd127008aa2aa0a303c9a0a48f4080a5bb7cd0b
URL: https://github.com/llvm/llvm-project/commit/ccd127008aa2aa0a303c9a0a48f4080a5bb7cd0b DIFF: https://github.com/llvm/llvm-project/commit/ccd127008aa2aa0a303c9a0a48f4080a5bb7cd0b.diff LOG: [clang-tidy] warnings-as-error no longer exits with ErrorCount When using `-warnings-as-errors`, If there are any warnings promoted to errors, clang-tidy exits with the number of warnings. This really isn't needed and can cause issues when the number of warnings doesn't fit into 8 bits as POSIX terminals aren't designed to handle more than that. This addresses https://bugs.llvm.org/show_bug.cgi?id=46305. Bug originally added in D15528 Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D81953 Added: Modified: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp index aca16b0d6d81..7f668345bbb1 100644 --- a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp +++ b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp @@ -478,7 +478,7 @@ int clangTidyMain(int argc, const char **argv) { llvm::errs() << WErrorCount << " warning" << Plural << " treated as error" << Plural << "\n"; } - return WErrorCount; + return 1; } if (FoundErrors) { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits