projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c7624e
)
[clangd] Handle errors before checking for cancelltion
author
Ilya Biryukov
<ibiryukov@google.com>
Mon, 3 Sep 2018 14:39:34 +0000
(14:39 +0000)
committer
Ilya Biryukov
<ibiryukov@google.com>
Mon, 3 Sep 2018 14:39:34 +0000
(14:39 +0000)
To avoid hitting assertions in llvm::Expected destructor.
llvm-svn: 341319
clang-tools-extra/clangd/ClangdServer.cpp
patch
|
blob
|
history
diff --git
a/clang-tools-extra/clangd/ClangdServer.cpp
b/clang-tools-extra/clangd/ClangdServer.cpp
index
6bdd082
..
7f0b29d
100644
(file)
--- a/
clang-tools-extra/clangd/ClangdServer.cpp
+++ b/
clang-tools-extra/clangd/ClangdServer.cpp
@@
-191,11
+191,10
@@
TaskHandle ClangdServer::codeComplete(PathRef File, Position Pos,
auto Task = [PCHs, Pos, FS, CodeCompleteOpts,
this](Path File, Callback<CodeCompleteResult> CB,
llvm::Expected<InputsAndPreamble> IP) {
- if (isCancelled())
- return CB(llvm::make_error<CancelledError>());
-
if (!IP)
return CB(IP.takeError());
+ if (isCancelled())
+ return CB(llvm::make_error<CancelledError>());
auto PreambleData = IP->Preamble;