SR-11889: Using Located<T> instead of std::pair<SourceLoc, T>

This commit is contained in:
Kita, Maksim
2019-12-08 22:51:48 +03:00
parent 06014e6226
commit b7cb3b67bf
38 changed files with 209 additions and 171 deletions

View File

@@ -41,7 +41,7 @@ using namespace swift;
using namespace ide;
static ModuleDecl *getModuleByFullName(ASTContext &Ctx, StringRef ModuleName) {
SmallVector<std::pair<Identifier, SourceLoc>, 4>
SmallVector<Located<Identifier>, 4>
AccessPath;
while (!ModuleName.empty()) {
StringRef SubModuleName;
@@ -52,7 +52,7 @@ static ModuleDecl *getModuleByFullName(ASTContext &Ctx, StringRef ModuleName) {
}
static ModuleDecl *getModuleByFullName(ASTContext &Ctx, Identifier ModuleName) {
return Ctx.getModule(std::make_pair(ModuleName, SourceLoc()));
return Ctx.getModule({{ModuleName, SourceLoc()}});
}
namespace {