[clangd][remote] Check an index file correctly
authorAleksandr Platonov <platonov.aleksandr@huawei.com>
Mon, 9 Nov 2020 18:39:01 +0000 (21:39 +0300)
committerAleksandr Platonov <platonov.aleksandr@huawei.com>
Mon, 9 Nov 2020 18:40:45 +0000 (21:40 +0300)
commit1bbf87e22a73011fdea411baf8fe768f854d497c
treecfdb4886d88f62e4ecd1b8c6be27690216aa8f8c
parent1867091f561b2108a7c20f7d6e416ceb40467786
[clangd][remote] Check an index file correctly

There is not reason to check `std::make_unique<...>(..)` return value,
but `clangd::clang::loadIndex()` returns `nullptr` if an index file could not be loaded (e.g. incorrect version).

Reviewed By: kadircet

Differential Revision: https://reviews.llvm.org/D91049
clang-tools-extra/clangd/index/remote/server/Server.cpp