tom-anders added inline comments.
================ Comment at: clang-tools-extra/clangd/CodeComplete.cpp:674 + else if (const auto *ND = dyn_cast<NamespaceDecl>(Context)) { + if (ND->isInlineNamespace()) + Scopes.AccessibleScopes.push_back(printQualifiedName(*ND) + "::"); ---------------- kadircet wrote: > since we know that the `Context` is a `NamespaceDecl` it should be safe to > use `printQualifiedName` always. any reason for the extra branching here > (apart from minimizing the change to behaviour)? if not I think we can get > rid of the special casing. Unfortunately, this fails CompletionTest.EnclosingScopeComesFirst and CompletionTest.NoDuplicatedQueryScopes, I think because of anonymous namespaces (where printNameSpaceScope would return an empty string, but (printQualifiedName(*ND) + "::" does not). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140915/new/ https://reviews.llvm.org/D140915 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits