summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2017-12-19 17:05:00 +0000
committerSam McCall <sam.mccall@gmail.com>2017-12-19 17:05:00 +0000
commite3e1570695c9a3d2fb04653da724298fa17f1c1b (patch)
treede24fdfcaefb72c41a827e956a64bce55a665e56 /clang-tools-extra
parentd873b6f6ba2c130dd88a6b8c05567b6f608729bf (diff)
downloadbcm5719-llvm-e3e1570695c9a3d2fb04653da724298fa17f1c1b.tar.gz
bcm5719-llvm-e3e1570695c9a3d2fb04653da724298fa17f1c1b.zip
[clangd] Fix warnings/compiler pickiness after r321083
llvm-svn: 321086
Diffstat (limited to 'clang-tools-extra')
-rw-r--r--clang-tools-extra/clangd/CodeComplete.cpp2
-rw-r--r--clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp
index 226e8f8e768..7e549a9008c 100644
--- a/clang-tools-extra/clangd/CodeComplete.cpp
+++ b/clang-tools-extra/clangd/CodeComplete.cpp
@@ -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.
diff --git a/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp b/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp
index 4e598d350bc..bbe0c8d1ba9 100644
--- a/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp
+++ b/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp
@@ -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) {
OpenPOWER on IntegriCloud