[clang-tools-extra] r244658 - Revert the diagnostic improvements in r244602 as they introduced a problematic dependency

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 13:21:45 PDT 2015


Author: dblaikie
Date: Tue Aug 11 15:21:45 2015
New Revision: 244658

URL: http://llvm.org/viewvc/llvm-project?rev=244658&view=rev
Log:
Revert the diagnostic improvements in r244602 as they introduced a problematic dependency

Seems we had some internal uses that include ClangTidyTest.h and weren't
ready for a gtest dependency. Reverting to give Manuel some time to look
into it.

Modified:
    clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h

Modified: clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h?rev=244658&r1=244657&r2=244658&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h (original)
+++ clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h Tue Aug 11 15:21:45 2015
@@ -17,7 +17,6 @@
 #include "clang/Frontend/FrontendActions.h"
 #include "clang/Tooling/Refactoring.h"
 #include "clang/Tooling/Tooling.h"
-#include "gtest/gtest.h"
 #include <map>
 
 namespace clang {
@@ -77,15 +76,8 @@ runCheckOnCode(StringRef Code, std::vect
                               FileContent.second);
   }
   Invocation.setDiagnosticConsumer(&DiagConsumer);
-  bool Result = Invocation.run();
-  if (!Result) {
-    std::string ErrorText;
-    for (const auto &Error : Context.getErrors()) {
-      ErrorText += Error.Message.Message + "\n";
-    }
-    ADD_FAILURE() << ErrorText;
+  if (!Invocation.run())
     return "";
-  }
 
   DiagConsumer.finish();
   tooling::Replacements Fixes;




More information about the cfe-commits mailing list