Port getLocStart -> getBeginLoc
Reviewers: javed.absar
Subscribers: nemanjai, kbarton, ilya-biryukov, ioeric, jkorous, arphaman, jfb, cfe-commits
Differential Revision: https://reviews.llvm.org/D50354
llvm-svn: 339400
diff --git a/clang-tools-extra/clang-move/ClangMove.cpp b/clang-tools-extra/clang-move/ClangMove.cpp
index b7a9363..80ce8e6 100644
--- a/clang-tools-extra/clang-move/ClangMove.cpp
+++ b/clang-tools-extra/clang-move/ClangMove.cpp
@@ -117,7 +117,7 @@
AST_POLYMORPHIC_SUPPORTED_TYPES(Decl, Stmt, TypeLoc),
std::string, AbsoluteFilePath) {
auto &SourceManager = Finder->getASTContext().getSourceManager();
- auto ExpansionLoc = SourceManager.getExpansionLoc(Node.getLocStart());
+ auto ExpansionLoc = SourceManager.getExpansionLoc(Node.getBeginLoc());
if (ExpansionLoc.isInvalid())
return false;
auto FileEntry =
@@ -323,7 +323,7 @@
getFullRange(const clang::Decl *D,
const clang::LangOptions &options = clang::LangOptions()) {
const auto &SM = D->getASTContext().getSourceManager();
- clang::SourceRange Full(SM.getExpansionLoc(D->getLocStart()),
+ clang::SourceRange Full(SM.getExpansionLoc(D->getBeginLoc()),
getLocForEndOfDecl(D));
// Expand to comments that are associated with the Decl.
if (const auto *Comment = D->getASTContext().getRawCommentForDeclNoCache(D)) {
@@ -331,8 +331,8 @@
Full.setEnd(Comment->getLocEnd());
// FIXME: Don't delete a preceding comment, if there are no other entities
// it could refer to.
- if (SM.isBeforeInTranslationUnit(Comment->getLocStart(), Full.getBegin()))
- Full.setBegin(Comment->getLocStart());
+ if (SM.isBeforeInTranslationUnit(Comment->getBeginLoc(), Full.getBegin()))
+ Full.setBegin(Comment->getBeginLoc());
}
return clang::CharSourceRange::getCharRange(Full);
@@ -351,7 +351,7 @@
const auto &SM = D->getASTContext().getSourceManager();
if (OldHeader.empty())
return false;
- auto ExpansionLoc = SM.getExpansionLoc(D->getLocStart());
+ auto ExpansionLoc = SM.getExpansionLoc(D->getBeginLoc());
if (ExpansionLoc.isInvalid())
return false;