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 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();