mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[NFC] Adopt new ImportPath types and terminology
# Conflicts: # lib/IDE/CodeCompletion.cpp
This commit is contained in:
@@ -374,8 +374,10 @@ static bool printModuleInterfaceDecl(Decl *D,
|
||||
|
||||
/// Sorts import declarations for display.
|
||||
static bool compareImports(ImportDecl *LHS, ImportDecl *RHS) {
|
||||
auto LHSPath = LHS->getFullAccessPath();
|
||||
auto RHSPath = RHS->getFullAccessPath();
|
||||
// TODO(SR-13490): Probably buggy--thinks "import Foo" == "import Foo.Bar".
|
||||
// ImportPathBase should provide universal comparison functions to avoid this.
|
||||
auto LHSPath = LHS->getImportPath();
|
||||
auto RHSPath = RHS->getImportPath();
|
||||
for (unsigned i: range(std::min(LHSPath.size(), RHSPath.size()))) {
|
||||
if (int Ret = LHSPath[i].Item.str().compare(RHSPath[i].Item.str()))
|
||||
return Ret < 0;
|
||||
|
||||
Reference in New Issue
Block a user