From: Hans Wennborg Date: Wed, 19 Nov 2014 22:02:11 +0000 (+0000) Subject: Revert r222363: "[clang-tidy] Count errors in ClangTidyDiagnosticConsumer" X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4986e5a4469b71a76a7391cb797297fb2a346f2;p=platform%2Fupstream%2Fllvm.git Revert r222363: "[clang-tidy] Count errors in ClangTidyDiagnosticConsumer" This was causing clang-tidy invocations that would previously pass despite source errors to fail. llvm-svn: 222390 --- diff --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp index ad341ce..06e0e3f 100644 --- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp +++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp @@ -277,9 +277,6 @@ void ClangTidyDiagnosticConsumer::finalizeLastError() { void ClangTidyDiagnosticConsumer::HandleDiagnostic( DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) { - // Count warnings/errors. - DiagnosticConsumer::HandleDiagnostic(DiagLevel, Info); - if (DiagLevel == DiagnosticsEngine::Note) { assert(!Errors.empty() && "A diagnostic note can only be appended to a message."); diff --git a/clang-tools-extra/test/clang-tidy/clang-tidy-diff.cpp b/clang-tools-extra/test/clang-tidy/clang-tidy-diff.cpp index 4b32852..205c002 100644 --- a/clang-tools-extra/test/clang-tidy/clang-tidy-diff.cpp +++ b/clang-tools-extra/test/clang-tidy/clang-tidy-diff.cpp @@ -6,7 +6,7 @@ struct A { virtual void f() {} virtual void g() {} }; -// CHECK-NOT: warning: +// CHECK-NOT: warning struct B : public A { void placeholder_for_f() {} // CHECK-SANITY: [[@LINE-1]]:8: warning: Annotate this