[clang-tools-extra] 6484aa1 - [clangd] Simplify relations deserialization loop, NFC.
Kadir Cetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 12 01:39:02 PST 2020
Author: Kadir Cetinkaya
Date: 2020-11-12T10:33:39+01:00
New Revision: 6484aa1add41e6483b60ad281b663968c2b68180
URL: https://github.com/llvm/llvm-project/commit/6484aa1add41e6483b60ad281b663968c2b68180
DIFF: https://github.com/llvm/llvm-project/commit/6484aa1add41e6483b60ad281b663968c2b68180.diff
LOG: [clangd] Simplify relations deserialization loop, NFC.
Added:
Modified:
clang-tools-extra/clangd/index/Serialization.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/index/Serialization.cpp b/clang-tools-extra/clangd/index/Serialization.cpp
index a817758d7a54..0b82224fa715 100644
--- a/clang-tools-extra/clangd/index/Serialization.cpp
+++ b/clang-tools-extra/clangd/index/Serialization.cpp
@@ -508,10 +508,8 @@ llvm::Expected<IndexFileIn> readRIFF(llvm::StringRef Data) {
if (Chunks.count("rela")) {
Reader RelationsReader(Chunks.lookup("rela"));
RelationSlab::Builder Relations;
- while (!RelationsReader.eof()) {
- auto Relation = readRelation(RelationsReader);
- Relations.insert(Relation);
- }
+ while (!RelationsReader.eof())
+ Relations.insert(readRelation(RelationsReader));
if (RelationsReader.err())
return error("malformed or truncated relations");
Result.Relations = std::move(Relations).build();
More information about the cfe-commits
mailing list