[all-commits] [llvm/llvm-project] ce87b0: [clangd] Fix getQueryScopes for using-directive wi...
Tom Praschan via All-commits
all-commits at lists.llvm.org
Thu Feb 9 10:53:48 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ce87b031437071f011026bb850a2fb2e5f9a72b4
https://github.com/llvm/llvm-project/commit/ce87b031437071f011026bb850a2fb2e5f9a72b4
Author: Tom Praschan <13141438+tom-anders at users.noreply.github.com>
Date: 2023-02-09 (Thu, 09 Feb 2023)
Changed paths:
M clang-tools-extra/clangd/CodeComplete.cpp
M clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list