summaryrefslogtreecommitdiffstats
path: root/clangd
diff options
context:
space:
mode:
Diffstat (limited to 'clangd')
-rw-r--r--clangd/CodeComplete.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clangd/CodeComplete.cpp b/clangd/CodeComplete.cpp
index 226e8f8e..7e549a90 100644
--- a/clangd/CodeComplete.cpp
+++ b/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.