mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CodeCompletion] When code completing import decls, we only show the module names that are not yet imported in previous import decls.
Swift SVN r30964
This commit is contained in:
@@ -1030,7 +1030,11 @@ public:
|
||||
RHS->getTopLevelModuleName()) < 0;
|
||||
});
|
||||
for (auto *M : Modules) {
|
||||
if (M->isAvailable() && !M->getTopLevelModuleName().startswith("_")) {
|
||||
if (M->isAvailable() &&
|
||||
!M->getTopLevelModuleName().startswith("_") &&
|
||||
// Name hidden implies not imported yet, exactly what code completion
|
||||
// wants.
|
||||
M->NameVisibility == clang::Module::NameVisibilityKind::Hidden) {
|
||||
CodeCompletionResultBuilder Builder(Sink,
|
||||
CodeCompletionResult::ResultKind::
|
||||
Keyword,
|
||||
|
||||
Reference in New Issue
Block a user