[clang-tools-extra] r348357 - Fix compilation error when using clang 3.6.0

Mikael Holmen via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 5 03:29:28 PST 2018


Author: uabelho
Date: Wed Dec  5 03:29:27 2018
New Revision: 348357

URL: http://llvm.org/viewvc/llvm-project?rev=348357&view=rev
Log:
Fix compilation error when using clang 3.6.0

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

Modified: clang-tools-extra/trunk/unittests/clangd/BackgroundIndexTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/BackgroundIndexTests.cpp?rev=348357&r1=348356&r2=348357&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/BackgroundIndexTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/BackgroundIndexTests.cpp Wed Dec  5 03:29:27 2018
@@ -26,7 +26,7 @@ RefsAre(std::vector<testing::Matcher<Ref
 }
 // URI cannot be empty since it references keys in the IncludeGraph.
 MATCHER(EmptyIncludeNode, "") {
-  return !arg.IsTU && !arg.URI.empty() && arg.Digest == FileDigest{0} &&
+  return !arg.IsTU && !arg.URI.empty() && arg.Digest == FileDigest{{0}} &&
          arg.DirectIncludes.empty();
 }
 
@@ -205,7 +205,7 @@ TEST_F(BackgroundIndexTest, DirectInclud
       ShardSource->Sources->lookup("unittest:///root/A.cc").DirectIncludes,
       UnorderedElementsAre("unittest:///root/A.h"));
   EXPECT_NE(ShardSource->Sources->lookup("unittest:///root/A.cc").Digest,
-            FileDigest{0});
+            FileDigest{{0}});
   EXPECT_THAT(ShardSource->Sources->lookup("unittest:///root/A.h"),
               EmptyIncludeNode());
 
@@ -216,7 +216,7 @@ TEST_F(BackgroundIndexTest, DirectInclud
       ShardHeader->Sources->lookup("unittest:///root/A.h").DirectIncludes,
       UnorderedElementsAre("unittest:///root/B.h"));
   EXPECT_NE(ShardHeader->Sources->lookup("unittest:///root/A.h").Digest,
-            FileDigest{0});
+            FileDigest{{0}});
   EXPECT_THAT(ShardHeader->Sources->lookup("unittest:///root/B.h"),
               EmptyIncludeNode());
 }




More information about the cfe-commits mailing list