[clang-tools-extra] r365793 - [clangd] Consume llvm::Error in test after r365792

Sam McCall via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 11 09:22:50 PDT 2019


Author: sammccall
Date: Thu Jul 11 09:22:50 2019
New Revision: 365793

URL: http://llvm.org/viewvc/llvm-project?rev=365793&view=rev
Log:
[clangd] Consume llvm::Error in test after r365792

Modified:
    clang-tools-extra/trunk/clangd/unittests/XRefsTests.cpp

Modified: clang-tools-extra/trunk/clangd/unittests/XRefsTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/unittests/XRefsTests.cpp?rev=365793&r1=365792&r2=365793&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/unittests/XRefsTests.cpp (original)
+++ clang-tools-extra/trunk/clangd/unittests/XRefsTests.cpp Thu Jul 11 09:22:50 2019
@@ -2150,11 +2150,13 @@ TEST(GetDeducedType, KwAutoExpansion) {
   for (Test T : Tests) {
     Annotations File(T.AnnotatedCode);
     auto AST = TestTU::withCode(File.code()).build();
-    ASSERT_TRUE(AST.getDiagnostics().empty()) << AST.getDiagnostics().begin()->Message;
+    ASSERT_TRUE(AST.getDiagnostics().empty())
+        << AST.getDiagnostics().begin()->Message;
     SourceManagerForFile SM("foo.cpp", File.code());
 
     for (Position Pos : File.points()) {
       auto Location = sourceLocationInMainFile(SM.get(), Pos);
+      ASSERT_TRUE(!!Location) << llvm::toString(Location.takeError());
       auto DeducedType = getDeducedType(AST, *Location);
       EXPECT_EQ(DeducedType->getAsString(), T.DeducedType);
     }




More information about the cfe-commits mailing list