[clang-tools-extra] 956c899 - [clangd] Fix serialization error check.
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 11 11:47:09 PST 2020
Author: Sam McCall
Date: 2020-11-11T20:46:04+01:00
New Revision: 956c899296dc19593c66b06af87e60564dff18e0
URL: https://github.com/llvm/llvm-project/commit/956c899296dc19593c66b06af87e60564dff18e0
DIFF: https://github.com/llvm/llvm-project/commit/956c899296dc19593c66b06af87e60564dff18e0.diff
LOG: [clangd] Fix serialization error check.
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 40bca7b7d4d5..dcea8e902fe4 100644
--- a/clang-tools-extra/clangd/index/Serialization.cpp
+++ b/clang-tools-extra/clangd/index/Serialization.cpp
@@ -499,10 +499,10 @@ llvm::Expected<IndexFileIn> readRIFF(llvm::StringRef Data) {
}
if (Chunks.count("cmdl")) {
Reader CmdReader(Chunks.lookup("cmdl"));
- if (CmdReader.err())
- return error("malformed or truncated commandline section");
InternedCompileCommand Cmd =
readCompileCommand(CmdReader, Strings->Strings);
+ if (CmdReader.err())
+ return error("malformed or truncated commandline section");
Result.Cmd.emplace();
Result.Cmd->Directory = std::string(Cmd.Directory);
Result.Cmd->CommandLine.reserve(Cmd.CommandLine.size());
More information about the cfe-commits
mailing list