Add getEndLoc API to replace getLocEnd
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D50348
llvm-svn: 339374
diff --git a/clang/lib/AST/ExprCXX.cpp b/clang/lib/AST/ExprCXX.cpp
index 04619df..cc4c631 100644
--- a/clang/lib/AST/ExprCXX.cpp
+++ b/clang/lib/AST/ExprCXX.cpp
@@ -250,7 +250,7 @@
return QualType();
}
-SourceLocation CXXPseudoDestructorExpr::getLocEnd() const {
+SourceLocation CXXPseudoDestructorExpr::getEndLoc() const {
SourceLocation End = DestroyedType.getLocation();
if (TypeSourceInfo *TInfo = DestroyedType.getTypeSourceInfo())
End = TInfo->getTypeLoc().getLocalSourceRange().getEnd();
@@ -456,7 +456,7 @@
return Loc;
}
-SourceLocation CXXConstructExpr::getLocEnd() const {
+SourceLocation CXXConstructExpr::getEndLoc() const {
if (isa<CXXTemporaryObjectExpr>(this))
return cast<CXXTemporaryObjectExpr>(this)->getLocEnd();
@@ -711,7 +711,7 @@
return getTypeInfoAsWritten()->getTypeLoc().getLocStart();
}
-SourceLocation CXXFunctionalCastExpr::getLocEnd() const {
+SourceLocation CXXFunctionalCastExpr::getEndLoc() const {
return RParenLoc.isValid() ? RParenLoc : getSubExpr()->getLocEnd();
}
@@ -796,7 +796,7 @@
return Type->getTypeLoc().getBeginLoc();
}
-SourceLocation CXXTemporaryObjectExpr::getLocEnd() const {
+SourceLocation CXXTemporaryObjectExpr::getEndLoc() const {
SourceLocation Loc = getParenOrBraceRange().getEnd();
if (Loc.isInvalid() && getNumArgs())
Loc = getArg(getNumArgs()-1)->getLocEnd();