diff options
Diffstat (limited to 'lib/Tooling/Refactoring/Rename')
| -rw-r--r-- | lib/Tooling/Refactoring/Rename/USRFinder.cpp | 4 | ||||
| -rw-r--r-- | lib/Tooling/Refactoring/Rename/USRLocFinder.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/Tooling/Refactoring/Rename/USRFinder.cpp b/lib/Tooling/Refactoring/Rename/USRFinder.cpp index 63f536c72a6f..4ed805fd504c 100644 --- a/lib/Tooling/Refactoring/Rename/USRFinder.cpp +++ b/lib/Tooling/Refactoring/Rename/USRFinder.cpp @@ -83,8 +83,8 @@ const NamedDecl *getNamedDeclAt(const ASTContext &Context, // see. If both start and end is either before or after the point we're // looking for the point cannot be inside of this decl. Don't even look at it. for (auto *CurrDecl : Context.getTranslationUnitDecl()->decls()) { - SourceLocation StartLoc = CurrDecl->getLocStart(); - SourceLocation EndLoc = CurrDecl->getLocEnd(); + SourceLocation StartLoc = CurrDecl->getBeginLoc(); + SourceLocation EndLoc = CurrDecl->getEndLoc(); if (StartLoc.isValid() && EndLoc.isValid() && SM.isBeforeInTranslationUnit(StartLoc, Point) != SM.isBeforeInTranslationUnit(EndLoc, Point)) diff --git a/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp b/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp index fb06b91118b0..7f60cf54c8ec 100644 --- a/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp +++ b/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp @@ -117,7 +117,7 @@ SourceLocation StartLocationForType(TypeLoc TL) { return NestedNameSpecifier.getBeginLoc(); TL = TL.getNextTypeLoc(); } - return TL.getLocStart(); + return TL.getBeginLoc(); } SourceLocation EndLocationForType(TypeLoc TL) { @@ -255,12 +255,12 @@ public: Decl = UsingShadow->getTargetDecl(); } - auto StartLoc = Expr->getLocStart(); + auto StartLoc = Expr->getBeginLoc(); // For template function call expressions like `foo<int>()`, we want to // restrict the end of location to just before the `<` character. SourceLocation EndLoc = Expr->hasExplicitTemplateArgs() ? Expr->getLAngleLoc().getLocWithOffset(-1) - : Expr->getLocEnd(); + : Expr->getEndLoc(); if (const auto *MD = llvm::dyn_cast<CXXMethodDecl>(Decl)) { if (isInUSRSet(MD)) { @@ -576,7 +576,7 @@ createRenameAtomicChanges(llvm::ArrayRef<std::string> USRs, // Hanlde using declarations explicitly as "using a::Foo" don't trigger // typeLoc for "a::Foo". for (const auto *Using : Finder.getUsingDecls()) - Replace(Using->getLocStart(), Using->getLocEnd(), "using " + NewName.str()); + Replace(Using->getBeginLoc(), Using->getEndLoc(), "using " + NewName.str()); return AtomicChanges; } |
