[NFC] Adopt new ImportPath types and terminology

# Conflicts:
#	lib/IDE/CodeCompletion.cpp
This commit is contained in:
Brent Royal-Gordon
2020-09-10 19:05:40 -07:00
parent 1ed3caece6
commit cff4ddf13a
52 changed files with 375 additions and 361 deletions

View File

@@ -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;