[clangd] Fix warnings/compiler pickiness after r321083

llvm-svn: 321086
This commit is contained in:
Sam McCall 2017-12-19 17:05:00 +00:00
parent d873b6f6ba
commit e3e1570695
2 changed files with 2 additions and 2 deletions

View File

@ -784,7 +784,7 @@ SpecifiedScope extraCompletionScope(Sema &S, const CXXScopeSpec &SS) {
DeclContext *DC = S.computeDeclContext(SS);
if (auto *NS = llvm::dyn_cast<NamespaceDecl>(DC)) {
Info.Resolved = NS->getQualifiedNameAsString();
} else if (auto *TU = llvm::dyn_cast<TranslationUnitDecl>(DC)) {
} else if (llvm::dyn_cast<TranslationUnitDecl>(DC) != nullptr) {
Info.Resolved = "::";
// Sema does not include the suffix "::" in the range of SS, so we add
// it back here.

View File

@ -488,7 +488,7 @@ std::unique_ptr<SymbolIndex> simpleIndexFromSymbols(
auto S = std::shared_ptr<std::vector<const Symbol *>>(std::move(Snap),
&Snap->Pointers);
I->build(std::move(S));
return I;
return std::move(I);
}
TEST(CompletionTest, NoIndex) {