summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd')
-rw-r--r--clang-tools-extra/clangd/CodeComplete.cpp2
1 files changed, 1 insertions, 1 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.
OpenPOWER on IntegriCloud