[clangd] Fix getQueryScopes for using-directive with inline namespace
authorTom Praschan <13141438+tom-anders@users.noreply.github.com>
Sun, 29 Jan 2023 16:02:56 +0000 (17:02 +0100)
committerTom Praschan <13141438+tom-anders@users.noreply.github.com>
Thu, 9 Feb 2023 19:53:33 +0000 (20:53 +0100)
commitce87b031437071f011026bb850a2fb2e5f9a72b4
treecee6390567ca6c99502060e87aa5baf3dbd4eef4
parent782045e727b70d19c7fa70c388eddb65390060d9
[clangd] Fix getQueryScopes for using-directive with inline namespace

For example, in the following code

```

using namespace std::string_literals;

int main() {
    strin^ // Completes `string` instead of `std::string`
}
```

The using declaration would make completion drop the std namespace, even though it shouldn't.

printNamespaceScope() skips inline namespaces, so to fix this use
printQualifiedName() instead

See https://github.com/clangd/clangd/issues/1451

Differential Revision: https://reviews.llvm.org/D140915
clang-tools-extra/clangd/CodeComplete.cpp
clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp