[clang-tools-extra] r222363 - [clang-tidy] Count errors in ClangTidyDiagnosticConsumer
Alexander Kornienko
alexfh at google.com
Wed Nov 19 08:07:27 PST 2014
Author: alexfh
Date: Wed Nov 19 10:07:26 2014
New Revision: 222363
URL: http://llvm.org/viewvc/llvm-project?rev=222363&view=rev
Log:
[clang-tidy] Count errors in ClangTidyDiagnosticConsumer
Modified:
clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp
clang-tools-extra/trunk/test/clang-tidy/clang-tidy-diff.cpp
Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp?rev=222363&r1=222362&r2=222363&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp Wed Nov 19 10:07:26 2014
@@ -277,6 +277,9 @@ void ClangTidyDiagnosticConsumer::finali
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.");
Modified: clang-tools-extra/trunk/test/clang-tidy/clang-tidy-diff.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/clang-tidy-diff.cpp?rev=222363&r1=222362&r2=222363&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/clang-tidy-diff.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/clang-tidy-diff.cpp Wed Nov 19 10:07:26 2014
@@ -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
More information about the cfe-commits
mailing list