================
@@ -1054,12 +1058,15 @@ llvm::Expected<TUSummary> 
JSONFormat::readTUSummary(llvm::StringRef Path) {
           .build();
     }
 
-    auto EntityIdRange =
+    auto ExpectedIdRange =
         llvm::make_second_range(getEntities(getIdTable(Summary)));
-    std::set<EntityId> EntityIds(EntityIdRange.begin(), EntityIdRange.end());
+    std::set<EntityId> ExpectedIds(ExpectedIdRange.begin(),
+                                   ExpectedIdRange.end());
 
+    // Move ExpectedIds in since linkageTableFromJSON consumes it to verify
+    // that the linkage table contains exactly the ids present in the IdTable.
     auto ExpectedLinkageTable =
-        linkageTableFromJSON(*LinkageTableArray, std::move(EntityIds));
+        linkageTableFromJSON(*LinkageTableArray, std::move(ExpectedIds));
----------------
steakhal wrote:

I was double checking how was the `ExpectedIds` declared, because if it was 
`const` declared, then the `std::move` wouldn't move but result in a copy.
Luckily, it wasn't const so it's all good!

https://github.com/llvm/llvm-project/pull/182961
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to